MIME C API Reference
Table of Contents | Previous
| Next
| Index
Messaging Access SDK Guide
Part 2. Messaging Access SDK C Reference
This chapter describes the functions and structures of the C language API for the MIME (Multipurpose Internet Mail Extension) protocol of the Messaging Access SDK.
You'll find links to each function and structure in this introduction. Each reference entry gives the name of the function or structure, its header file, its syntax, and its parameters.
All C interface definitions are found in the mime.h
and mimeparser.h
files.
[Top]
MIME functions are organized into functional groups. Click the group name to find the reference entries for the functions in the group. To find functions listed in alphabetical order by name, see MIME Functions by Name.
[Top] [MIME Functions by Task]
This table lists MIME functions in alphabetical order by name. To find functions listed by functional group, see MIME Functions by Functional Group.
[Top] [MIME Functions by Name] [MIME Functions by Task]
The MIME BasicPart type includes all Basic MIME BodyPart types, including text, image, audio, video, and application.
This table lists Basic Part functions alphabetically by name, with descriptions. Click the function name to get information about it.
[Top] [MIME Functions by Functional Group]
Deletes the body data of the body part.
#include <mime.h>
int mime_basicPart_deleteData (
mime_basicPart_t * in_pBasicPart);
The function has the following parameters:
This function deletes the bodyData from a part. After a message is built, you can use one of the MIME delete functions to delete the entire message, the body, or a message part as needed. For more information, see Deleting Parts of a Message.
mime_multiPart_deletePart, mime_message_deleteBody,
mime_messagePart_deleteMessage
[Top] [Basic (Leaf) Body Part Functions] [MIME Functions by Functional Group]
Frees the basic part, including all internal structures.
#include <mime.h>
int mime_basicPart_free_all( mime_basicPart_t * in_pBasicPart);
The function has the following parameters:
This function frees the basic part and its internal structures.
mime_multiPart_free_all, mime_message_free_all,
mime_messagePart_free_all, mimeDynamicParser_free
[Top] [Basic (Leaf) Body Part Functions] [MIME Functions by Functional Group]
Returns the decoded body data in a buffer.
#include <mime.h>
int mime_basicPart_getDataBuf (
mime_basicPart_t * in_pBasicPart,
unsigned int * out_pSize
char ** out_ppDataBuf);
The function has the following parameters:
This function returns the decoded body data in a buffer.
For more information, see Building the MIME Message.
mime_basicPart_getDataStream, mime_basicPart_setDataBuf,
mime_basicPart_setDataStream
[Top] [Basic (Leaf) Body Part Functions] [MIME Functions by Functional Group]
Returns the decoded body data as an input stream.
#include <mime.h>
int mime_basicPart_getDataStream (
mime_basicPart_t * in_ppBasicPart,
char * in_pFileName,
nsmail_inputstream_t ** out_ppDataStream);
The function has the following parameters:
This function returns the file named in the in_pFileName
parameter. If this parameter is null
, the function returns a memory-based input-stream.
For more information, see Building the MIME Message.
mime_basicPart_getDataBuf,
mime_basicPart_setDataBuf,
mime_basicPart_setDataStream
[Top] [Basic (Leaf) Body Part Functions] [MIME Functions by Functional Group]
Returns the size of the body data in bytes.
#include <mime.h>
int mime_basicPart_getSize (
mime_basicPart_t * in_pBasicPart,
unsigned int * out_pSize);
The function has the following parameters:
For more information, see Building the MIME Message.
mime_basicPart_getDataBuf, mime_basicPart_getDataStream
[Top] [Basic (Leaf) Body Part Functions] [MIME Functions by Functional Group]
Writes the byte stream for this part with MIME headers and encoded body data.
#include <mime.h>
int mime_basicPart_putByteStream (
mime_basicPart_t * in_pBasicPart,
mime_outputstream_t * in_pOutput_stream);
The function has the following parameters:
This function encodes the specified basic part with MIME headers and encoded body data. This places the part in MIME canonical format, so that it can be transported using SMTP or any other transport method.
For more information, see Encoding the Message.
mime_messagePart_putByteStream,
mime_message_putByteStream,
mime_multiPart_putByteStream
[Top] [Basic (Leaf) Body Part Functions] [MIME Functions by Functional Group]
Sets the body data for this part from a buffer.
#include <mime.h>
int mime_basicPart_setDataBuf (
mime_basicPart_t * in_pBasicPart,
unsigned int in_size,
const char * in_pDataBuf)
boolean in_fCopyData);
The function has the following parameters:
You can add data only to a new, already created mime_basicPart
with empty body data. For more information, see Adding Content to the Message.
mime_basicPart_getDataBuf, mime_basicPart_getDataStream,
mime_malloc, mime_memfree
[Top] [Basic (Leaf) Body Part Functions] [MIME Functions by Functional Group]
Sets the body data for this part from an input stream.
#include <mime.h>
int mime_basicPart_setDataStream (
mime_basicPart_t * in_pBasicPart,
mime_inputstream_t * in_ptheDataStream
boolean in_fCopyData);
The function has the following parameters:
You can add data only to new, already created mime_basicPart
with empty body data. For more information, see Adding Content to the Message.
mime_basicPart_getDataBuf, mime_basicPart_getDataStream,
mime_basicPart_setDataBuf
[Top] [Basic (Leaf) Body Part Functions] [MIME Functions by Functional Group]
The message content type is part of the Composite Body Part Types Group. Message functions create, add to, or perform other operations on the message as a whole.
This table lists Message functions alphabetically by name, with descriptions. Click the function name to get information about it.
[Top] [MIME Functions by Functional Group]
Adds a basic part as the body of the message.
#include <mime.h>
int mime_message_addBasicPart (
mime_message_t * in_pMessage,
mime_basicPart_t * in_pBasicPart,
BOOLEAN in_fClone);
The function has the following parameters:
This function sets the content type according to the message type. If the message body is already present, an error occurs.
For more information, see Building the MIME Message.
mime_multiPart_addBasicPart, mime_multiPart_addMessagePart,
mime_multiPart_addMultiPart, mime_multiPart_deletePart,
mime_message_addBasicPart, mime_message_addMultiPart
[Top] [Message Functions] [MIME Functions by Functional Group]
Adds the message part as the body of the message.
#include <mime.h>
int mime_message_addMessagePart (
mime_message_t * in_pMessage,
mime_messagePart_t * in_pMessagePart,
BOOLEAN in_fClone);
The function has the following parameters:
This function adds the message part and sets the message content type to message part to match the added part. If the message body is already present, an error occurs. For more information, see Building the MIME Message.
mime_multiPart_addBasicPart, mime_multiPart_addMessagePart,
mime_multiPart_addMultiPart, mime_multiPart_deletePart,
mime_message_addBasicPart, mime_message_addMultiPart
[Top] [Message Functions] [MIME Functions by Functional Group]
Adds a multipart as the body of the message.
#include <mime.h>
int mime_message_addMultiPart (
mime_message_t * in_pMessage,
mime_multiPart_t * in_pMultiPart,
BOOLEAN in_fClone);
The function has the following parameters:
A multipart type is made up of one or more body parts. This function adds a multipart and sets the message content type to multipart to match the type of the added part. If the message body is already present, an error occurs. For more information, see Building the MIME Message.
mime_multiPart_addBasicPart, mime_multiPart_addMessagePart,
mime_multiPart_deletePart, mime_message_addBasicPart,
mime_message_addMessagePart
[Top] [Message Functions] [MIME Functions by Functional Group]
Creates a message given text-data and a file to attach.
#include <mime.h>
int mime_message_create (char * in_pText,
char * in_pFileFullName,
mime_encoding_type in_perf_file_encoding,
mime_message_t ** out_ppMessage);
The function has the following parameters:
This function creates a MIME message given either a file attachment or text data, or both. Either a fully-qualified file-name for the in_pFileFullName
parameter or the text data for the in_pText
parameter is required. MIME creates a message with the parameter it gets, but cannot if both parameters are null
; in this case it returns an error.
NOTE:
Values for the in_pText
and in_pFileFullName
parameters can be found
upon return from this call. See
mime_memfree
. §
For more information, see Building the MIME Message.
mime_multiPart_addBasicPart, mime_multiPart_addMessagePart,
mime_multiPart_deletePart, mime_message_addBasicPart,
mime_message_addMessagePart, mime_malloc, mime_memfree
[Top] [Message Functions] [MIME Functions by Functional Group]
Deletes the body part that makes up the body of this message.
#include <mime.h>
int mime_message_deleteBody (
mime_message_t * in_pMessage);
The function has the following parameters:
This function deletes a body part that is a message body. After a message is built, you can use one of the MIME delete functions to delete the entire message, the body, or a message part as needed. For more information, see Deleting Parts of a Message.
mime_basicPart_deleteData, mime_multiPart_deletePart,
mime_messagePart_deleteMessage
[Top] [Message Functions] [MIME Functions by Functional Group]
Frees the message including all internal structures.
#include <mime.h>
int mime_message_free_all ( mime_message_t * in_pMessage);
The function has the following parameters:
This function frees the message, including all internal data structures.
mime_basicPart_free_all, mime_multiPart_free_all,
mimeDynamicParser_free, mime_messagePart_free_all
[Top] [Message Functions] [MIME Functions by Functional Group]
Returns the body part that makes up the body of the message.
#include <mime.h>
int mime_message_getBody ( mime_message_t * pMessage,
mime_content_type * in_pContentType,
void ** out_ppTheBodyPart;
The function has the following parameters:
mime_message_getContentType
[Top] [Message Functions] [MIME Functions by Functional Group]
Returns the content subtype of this message.
#include <mime.h>
int mime_message_getContentSubType (
mime_message_t * in_pMessage,
char ** out_ppSubType);
The function has the following parameters:
This function returns the MIME subtype of this message. For more information, see MIME Content Types.
mime_message_getContentType, mime_message_getContentTypeParams
[Top] [Message Functions] [MIME Functions by Functional Group]
Returns the content type of this message.
#include <mime.h>
int mime_message_getContentType (
mime_message_t * in_pMessage,
mime_content_type * out_content_type);
The function has the following parameters:
The content type can be text, image, audio, video, or application. For more information, see MIME Content Types.
mime_message_getContentTypeParams
[Top] [Message Functions] [MIME Functions by Functional Group]
Returns the content_type
parameters of this message.
#include <mime.h>
int mime_message_getContentTypeParams (
mime_message_t * in_pMessage,
char ** out_ppParams);
The function has the following parameters:
mime_message_getContentType
[Top] [Message Functions] [MIME Functions by Functional Group]
Returns the header value, given the header name.
#include <mime.h>
int mime_message_getHeader (
mime_message_t * in_pMessage,
char * in_pName,
char ** out_ppValue);
The function has the following parameters:
This function returns the value of the header, given the header name, it is in the message).
mime_message_getContentType
[Top] [Message Functions] [MIME Functions by Functional Group]
Writes the encoded byte stream for this part to an output stream.
#include <mime.h>
int mime_message_putByteStream (
mime_message_t * in_pMessage,
nsmail_outputstream_t * in_pOutput_stream);
The function has the following parameters:
This function encodes the specified part with MIME headers and encoded body data. This places the part in MIME canonical format, so that it can be transported using SMTP or any other transport method.
For more information, see Encoding the Message.
mime_multiPart_putByteStream, mime_messagePart_putByteStream
[Top] [MIME Functions by Functional Group] [MIME Functions by Functional Group] [MIME Functions by Task]
The Message Part body part represents a message that becomes the content of a another message, for example, when forwarded.
This table lists Message Part functions alphabetically by name, with descriptions. Click the function name to get information about it.
[Top] [MIME Functions by Functional Group]
Deletes the MIME message that makes up the body of this part.
#include <mime.h>
int mime_messagePart_deleteMessage (
mime_messagePart_t * in_pMessagePart);
The function has the following parameters:
This function deletes a forwarded MIME message from a part. After a message is built, you can use one of the MIME delete functions to delete the entire message, the body, or a message part as needed. For more information, see Deleting Parts of a Message.
mime_basicPart_deleteData, mime_multiPart_deletePart,
mime_message_deleteBody
[Top] [Message Part Functions] [MIME Functions by Functional Group]
Frees the message part, including all internal structures.
#include <mime.h>
int mime_messagePart_free_all (
mime_messagePart_t * in_pMessagePart);
The function has the following parameter:
This function frees the message part and its internal structures.
mime_basicPart_free_all, mime_multiPart_free_all,
mime_message_free_all, mimeDynamicParser_free
[Top] [Message Part Functions] [MIME Functions by Functional Group]
Creates a message part from a message structure.
#include <mime.h>
int mime_messagePart_fromMessage (
mime_message_t * in_pMessage,
mime_messagePart_t ** out_ppMessagePart);
The function has the following parameters:
For more information, see Adding Content to the Message.
mime_messagePart_getMessage, mime_message_create
[Top] [Message Part Functions] [MIME Functions by Functional Group]
Retrieves the message from the message part.
#include <mime.h>
int mime_messagePart_getMessage (
mime_messagePart_t * in_pMessagePart,
mime_message_t ** out_ppMessage);
The function has the following parameters:
mime_messagePart_fromMessage, mime_messagePart_setMessage
[Top] [Message Part Functions] [MIME Functions by Functional Group]
Writes the byte stream for this part to an output stream.
#include <mime.h>
int mime_messagePart_putByteStream (
mime_messagePart_t * in_pMessagePart,
mime_outputstream_t * in_pOutput_stream);
The function has the following parameters:
For more information, see Encoding the Message.
mime_multiPart_putByteStream, mime_message_putByteStream
[Top] [Message Part Functions] [MIME Functions by Functional Group]
Sets the parsed message as the body of this message part.
#include <mime.h>
int mime_messagePart_setMessage (
mime_messagePart_t * in_pMessagePart,
mime_message_t * in_pMessage);
The function has the following parameters:
If you try to set a message that has already been set, you get an error message. For more information, see Building the MIME Message.
mime_messagePart_getMessage
[Top] [Message Part Functions] [MIME Functions by Functional Group]
The multipart content type is part of the Composite Body Part Types Group. It describes a message that is made up of one or more sub-body parts. The multipart type has several subtypes that describe how the sub-parts relate to each other, including mixed, alternative, digest, and parallel.
This table lists Multipart functions alphabetically by name, with descriptions. Click the function name to get information about it.
[Top] [MIME Functions by Functional Group]
Adds a basic part to the multipart.
#include <mime.h>
int mime_multiPart_addBasicPart (
mime_multiPart_t * in_pMultiPart,
mime_basicPart_t * in_pBasicPart,
boolean in_fClone,
int * out_pIndex_assigned);
The function has the following parameters:
This function adds an existing basic part to a multipart at the specified index. The in_fClone
parameter specifies whether the function returns the body part or a cloned copy. For more information, see Adding a Basic Part to a Multipart.
mime_multiPart_addMessagePart, mime_multiPart_addMultiPart,
mime_multiPart_deletePart, mime_message_addBasicPart,
mime_message_addMessagePart, mime_message_addMultiPart
[Top] [Multipart Functions] [MIME Functions by Functional Group]
Adds a file as basic part to the multipart.
#include <mime.h>
int mime_multiPart_addFile (
mime_multiPart_t * in_pMultiPart,
char * in_pFileFullName,
mime_encoding_type in_perf_file_encoding,
int * out_index_assigned);
The function has the following parameters:
The file added by this function must already exist and you must identify it with a fully-qualified file-name including PATH. If either the in_pText
or in_pFileFullName
parameter is null
, the function creates a MIME message with the non-null
parameter. If both parameters are null
, an error is returned.
For more information, see Building the MIME Message.
mime_multiPart_addMessagePart, mime_multiPart_addMultiPart,
mime_multiPart_deletePart, mime_message_addBasicPart,
mime_message_addMessagePart, mime_message_addMultiPart
[Top] [Multipart Functions] [MIME Functions by Functional Group]
Adds a message part to the multipart.
#include <mime.h>
int mime_multiPart_addMessagePart (
mime_multiPart_t * in_pMultiPart,
mime_messagePart_t * in_pMessagePart,
BOOLEAN in_fClone,
int * out_Index_assigned);
The function has the following parameters:
For more information, see Building the MIME Message.
mime_multiPart_addBasicPart, mime_multiPart_addMultiPart,
mime_multiPart_deletePart, mime_message_addBasicPart,
mime_message_addMessagePart, mime_message_addMultiPart
[Top] [Multipart Functions] [MIME Functions by Functional Group]
Adds a multipart to the multipart.
#include <mime.h>
int mime_multiPart_addMultiPart (
mime_multiPart_t * in_pMultiPart,
mime_multiPart_t * in_pMultiPartToAdd,
boolean in_fClone,
int * out_Index_assigned);
The function has the following parameters:
For more information, see Building the MIME Message.
mime_multiPart_addBasicPart, mime_multiPart_addMessagePart,
mime_multiPart_deletePart, mime_message_addBasicPart,
mime_message_addMessagePart, mime_message_addMultiPart
[Top] [Multipart Functions] [MIME Functions by Functional Group]
Deletes the body part at the requested index from this multipart.
#include <mime.h>
int mime_multiPart_deletePart (
mime_multiPart_t * in_pMultiPart,
int in_index);
The function has the following parameters:
This function deletes the body part at the specified index. After a message is built, you can use one of the MIME delete functions to delete the entire message, the body, or a message part as needed. For more information, see Deleting Parts of a Message.
mime_basicPart_deleteData,
mime_messagePart_deleteMessage,
mime_message_deleteBody
[Top] [Multipart Functions] [MIME Functions by Functional Group]
Frees the multipart including all internal structures.
#include <mime.h>
int mime_multiPart_free_all (
mime_multiPart_t * in_pMultiPart);
The function has the following parameters:
This function frees the multipart and its internal structures.
mime_basicPart_free_all, mime_message_free_all,
mime_messagePart_free_all, mimeDynamicParser_free
[Top] [Multipart Functions] [MIME Functions by Functional Group]
Returns the body part at the specified index.
#include <mime.h>
int mime_multiPart_getPart (
mime_multiPart_t * in_pMultiPart,
int in_index,
mime_content_type * in_pContentType,
void ** out_ppTheBodyPart );
The function has the following parameters:
This function returns the body part, specified by its index in the in_index
parameter.
mime_multiPart_getPartCount
[Top] [Multipart Functions] [MIME Functions by Functional Group]
Returns the count of the body parts in this multipart.
#include <mime.h>
int mime_multiPart_getPartCount (
mime_multiPart_t * in_pMultiPart,
int * count);
The function has the following parameters:
mime_multiPart_getPart
[Top] [Multipart Functions] [MIME Functions by Functional Group]
Writes out the encoded byte stream for this multipart with MIME headers and encoded body data.
#include <mime.h>
int mime_multiPart_putByteStream (
mime_multiPart_t * in_pMultiPart,
nsmail_outputstream_t * in_pOutput_stream);
The function has the following parameters:
This function encodes the specified multipart with MIME headers and encoded body data. This places the part in MIME canonical format, so that it can be transported using SMTP or any other transport method.
For more information, see Encoding the Message.
mime_messagePart_putByteStream,
mime_message_putByteStream, mime_basicPart_putByteStream
[Top] [Multipart Functions] [MIME Functions by Functional Group]
MIME utility functions perform specialized encoding and decoding. In addition, two convenience functions create and destroy headers.
This table lists MIME Utility functions alphabetically by name, with descriptions. Click the function name to get information about it.
[Top] [MIME Functions by Functional Group]
Decodes Base64-encoded data and writes it to the output stream.
#include <mime.h>
int mime_decodeBase64 (
nsmail_inputstream_t * in_pInput_stream,
nsmail_outputstream_t * in_pOutput_stream);
The function has the following parameters:
This function decodes Base-64-encoded data from the input_stream
and writes it to the output_stream
. Base64 is the default encoding for non-Text content types.
mime_decodeHeaderString, mime_decodeQP,
mime_encodeBase64
[Top] [MIME Utility Functions] [MIME Functions by Functional Group]
Decodes and returns a header string.
#include <mime.h>
int mime_decodeHeaderString (char * inString,
char ** out_ppString);
The function has the following parameters:
If the input string is not encoded according to RFC 2047 rules, this function returns the same input string. Otherwise, it decodes and returns the decoded string.
For more information, see Parsing the Entire Message.
mime_decodeBase64, mime_decodeQP, mime_encodeHeaderString
[Top] [MIME Utility Functions] [MIME Functions by Functional Group]
Decodes Quoted Printable-encoded data and writes it to the output stream.
#include <mime.h>
int mime_decodeQP (mime_inputstream_t * in_pInput_stream,
mime_outputstream_t * out_pOutput_stream
The function has the following parameters:
This function decodes QuotedPrintable-encoded data from the input_stream
and writes it to the output_stream
. For more information, see Parsing the Entire Message
mime_decodeBase64, mime_decodeHeaderString, mime_encodeQP
[Top] [MIME Utility Functions] [MIME Functions by Functional Group]
Encodes the data from an input stream and writes it to an output stream, using Base64 encoding.
#include <mime.h>
int mime_encodeBase64 (
mime_inputstream_t * in_pInput_stream,
mime_outputstream_t * out_pOutput_stream);
The function has the following parameters:
For more information, see Encoding and Decoding Utilities.
mime_encodeHeaderString, mime_encodeQP, mime_decodeBase64
[Top] [MIME Utility Functions] [MIME Functions by Functional Group]
Encodes a header string.
#include <mime.h>
int mime_encodeHeaderString (char * inString,
char * in_charset,
char in_encoding,
char ** out_ppOutString);
The function has the following parameters:
This function encodes a header string as defined in RFC 2047. The encoded string can be used as the value of unstructured headers or in the comments section of structured headers. For a complete list, see Encoding and Decoding Headers.
mime_encodeBase64, mime_encodeQP, mime_decodeHeaderString
[Top] [MIME Utility Functions] [MIME Functions by Functional Group]
Encodes the data from an input_stream
and writes to an output_stream
, using QP encoding.
#include <mime.h>
int mime_encodeQP (
mime_inputstream_t * in_pInput_stream,
mime_outputstream_t * out_pOutput_stream);
The function has the following parameters:
For more information, see Encoding and Decoding Utilities.
mime_encodeBase64, mime_encodeHeaderString, mime_encodeQP
[Top] [MIME Utility Functions] [MIME Functions by Functional Group]
Frees a MIME header.
#include <mime.h>
int mime_header_free (mime_header_t * in_pHdr);
The function has the following parameters:
This function frees a mime_header_t
structure.
mime_Header_new, mime_header_t,
mime_basicPart_free_all, mime_multiPart_free_all,
mime_message_free_all, mime_messagePart_free_all
[Top] [MIME Utility Functions] [MIME Functions by Functional Group]
Builds and returns a MIME header, given header name and value.
#include <mime.h>
mime_header_t * mime_header_new (char * in_pName,
char * in_pValue);
The function has the following parameters:
This function can create a
mime_header_t
structure with either or both of the name and value parameters. If both are null
, the function returns null
. For more information, see Adding Message Headers.
mime_header_t, mime_Header_free
[Top] [MIME Utility Functions] [MIME Functions by Functional Group]
Returns the MIME type information for the specified file, based on file extension.
#include <mime.h>
int getFileMIMEType (char * in_pFilename_ext,
file_mime_type * in_pFileMIMEType);
The function has the following parameters:
Based on file extension, this method attempts to determine the file MIME type. By default, it returns the application/octet-stream.
This helper method is useful for attaching files and setting their MIME-types automatically.
mime_encodeBase64, mime_encodeHeaderString, mime_encodeQP
[Top] [MIME Utility Functions] [MIME Functions by Functional Group]
Allocates memory for use with the MIME API.
#include <mime.h>
void * mime_malloc (unsigned int in_size);
The function has the following parameter:
This function allocates memory of the specified size. It is preferable to use this function instead of malloc
for memory you are allocating for use with the MIME API. By using mime_malloc
, you avoid heap space conflicts that can occur when the mail application links with two or more libraries that support malloc
and free
.
Internally, this function simply invokes malloc, so its semantics and usage are identical to those of malloc
.
mime_memfree
[Top] [MIME Utility Functions] [MIME Functions by Functional Group]
Frees memory allocated by the SDK.
#include <mime.h>
void mime_memfree (void * in_pMem);
The function has the following parameter:
This function frees any memory allocated by the SDK. This includes data buffers returned by mime_basicPart_getDataBuf
and memory allocated using mime_malloc
.
Internally, this function simply invokes free
, so its semantics and usage are identical to those of free
.
mime_malloc, mime_basicPart_getDataBuf
[Top] [MIME Utility Functions] [MIME Functions by Functional Group]
These functions provide the capabilities of the dynamic parser. For more information, see Dynamic Parsing.
This table lists Dynamic Parsing functions alphabetically by name, with descriptions. Click the function name to get information about it.
[Top] [MIME Functions by Functional Group]
Begins parsing a new message.
#include <mimeparser.h>
int beginDynamicParse( struct mimeParser * in_pParser );
The function has the following parameter:
For more information, see Dynamic Parsing.
mimeDynamicParser_new
[Top] [Dynamic Parsing Functions] [MIME Functions by Functional Group]
Continues to parse data from a data buffer.
#include <mimeparser.h>
int dynamicParse( struct mimeParser *in_pParser,
char * in_pData, int in_nLen );
The function has the following parameters:
For more information, see Dynamic Parsing.
dynamicParseInputstream
[Top] [Dynamic Parsing Functions] [MIME Functions by Functional Group]
Continues to parse data from an input-stream.
#include <mimeparser.h>
int dynamicParseInputstream(
struct mimeParser *in_pParser,
struct nsmail_inputstream *in_pInput);
The function has the following parameters:
For more information, see Dynamic Parsing.
dynamicParse
[Top] [Dynamic Parsing Functions] [MIME Functions by Functional Group]
Tells the parser that there is no more data to parse.
#include <mimeparser.h>
int endDynamicParse( struct mimeParser *in_pParser );
The function has the following parameter:
For more information, see Dynamic Parsing.
dynamicParseInputstream
[Top] [Dynamic Parsing Functions] [MIME Functions by Functional Group]
Frees the dynamic parser.
#include <mimeparser.h>
void mimeDynamicParser_free(
struct mimeParser ** in_ppParser );
The function has the following parameter:
For more information, see Dynamic Parsing.
beginDynamicParse, mime_basicPart_free_all,
mime_multiPart_free_all, mime_message_free_all,
mime_messagePart_free_all
[Top] [Dynamic Parsing Functions] [MIME Functions by Functional Group]
Creates a dynamic parser.
#include <mimeparser.h>
int mimeDynamicParser_new(
mimeDataSink_t * in_pDataSink,
struct mimeParser ** out_ppParser);
The function has the following parameters:
This function creates the dynamic parser. If the parse operation is not going to use callbacks to a data sink, the value for pdataSink
should be null
.
For more information, see Dynamic Parsing and Creating the Dynamic Parser.
beginDynamicParse, mimeDynamicParser_free
[Top] [Dynamic Parsing Functions] [MIME Functions by Functional Group]
These functions provide MIME parsing functions. For more information, see Parsing MIME Messages.
his table lists MIME Data Sink functions alphabetically by name, with descriptions. Click the function name to get information about it.
[Top] [MIME Functions by Functional Group]
Parses an entire message from a data buffer.
#include <mimeparser.h> (
int parseEntireMessage (char * in_pData,
int in_nLen,
struct mime_message ** in_ppMimeMessage
The function has the following parameters:
This function is one of two routines for parsing an entire message. parseEntireMessage
parses data received from a data buffer, while parseEntireMessageInputstream
parses an entire message from an input stream.
For more information, see Parsing the Entire Message.
parseEntireMessageInputstream
[Top] [Message Parsing Functions] [MIME Functions by Functional Group]
Parses an entire message in a single operation from an input stream.
#include <mimeparser.h>
int parseEntireMessageInputstream(
struct nsmail_inputstream *in_pInput,
struct mime_message ** out_ppMimeMessage);
The function has the following parameters:
This function is one of two routines for parsing an entire message in a single operation. parseEntireMessage
parses data received from a data buffer, while parseEntireMessageInputstream
parses an entire message from an input stream.
For more information, see Parsing the Entire Message.
parseEntireMessage
[Top] [Message Parsing Functions] [MIME Functions by Functional Group]
These functions create and destroy the MIME data sink. For more information, see Creating a Data Sink.
This table lists MIME Data Sink functions alphabetically by name, with descriptions. Click the function name to get information about it.
[Top] [MIME Functions by Functional Group]
Frees a MIME data sink and its data members.
#include <mimeparser.h>
void mimeDataSink_free( mimeDataSink_t ** pp );
The function has the following parameter:
This function frees all mimeDataSink
function pointers and deallocates its storage space. The user must free any opaque data.
For more information, see Creating a Data Sink.
parseEntireMessage, mimeDataSink_t, mimeDataSink_new
[Top] [Data Sink Functions] [MIME Functions by Functional Group]
Creates a new data sink.
#include <mimeparser.h>
int mimeDataSink_new( mimeDataSink_t **pp );
The function has the following parameters:
This function initializes all mimeDataSink
function pointers and allocates space for the structure. The data sink is made up of function pointers and opaque data, which are set to null
when the sink is initialized.
For more information, see Creating a Data Sink and SDK Response Sinks for C.
parseEntireMessage, mimeDataSink_t, mimeDataSink_free
[Top] [Data Sink Functions] [MIME Functions by Functional Group]
Table of Contents | Previous
| Next
| Index
Last Updated: June 3, 1998
Copyright © 1998
Netscape Communications Corporation