Table of Contents | Previous
| Next
| Index
Messaging Access SDK Guide
Part 2. Messaging Access SDK C Reference
This section defines MIME data structures, listed in alphabetical order.
All MIME definitions are found in the mime.h
and mimeparser.h
files. The source file for each structure is noted in its reference entry.
[Top]
Represents the file MIME type.
#include <mime.h>
typedef struct file_mime_type
{
mime_content_type content_type;
char * content_subtype;
char * content_params;
mime_encoding_type mime_encoding;
} file_mime_type;
The structure has the following fields:
This structure contains MIME
Content Type and MIME Encoding information, and is used only by the
getFileMIMEType
function.
getFileMIMEType
[Top] [MIME Structures]
Common structure for leaf parts: text, audio, video, image and application.
#include <mime.h>
typedef struct mime_basicPart
{
/* Common to all parts */
char * content_description;
mime_disp_type content_disposition;
char * content_disp_params;
/* content disposition parameters */
mime_content_type content_type;
char * content_subtype;
char * content_type_params;
char * contentID;
mime_header_t * extra_headers;
/* additional X- and Content-headers */
/* Specific to basic part */
char * contentMD5;
mime_encoding_type encoding_type;
/* Data that client cannot directly manipulate */
void * pInternal;
} mime_basicPart_t;
The structure has the following fields:
This structure represents the MIME basic part, which can be of text, audio, video, image, and application content types.
For more information, see Structure of a MIME Message and Adding Content to the Message. For functions that manipulate this structure, see Basic (Leaf) Body Part Functions.
mime_multiPart_t, mime_messagePart_t, mime_message_t
[Top] [MIME Structures]
Represents the MIME message header.
#include <mime.h>
typedef struct mime_header
{
char * name;
char * value;
struct mime_header * next;
} mime_header_t;
The structure has the following fields:
This structure represents the RFC 822-compliant MIME message header. It consists of lines that describe the sender, subject, recipient, date, version of MIME in use, and a variety of other information, depending on the implementation in use.
For more information, see Structure of a MIME Message and Adding Message Headers.
mime_basicPart_t, mime_multiPart_t, mime_messagePart_t, mime_message_t
[Top] [MIME Structures]
Represents the MIME input stream.
#include <mime.h>
typedef struct nsmail_inputstream mime_inputstream_t;
nsmail_inputstream_t, mime_outputstream_t
[Top] [MIME Structures]
Represents the MIME message.
#include <mime.h>
typedef struct mime_message
{
mime_header_t * rfc822_headers;
/* Data that client cannot directly manipulate */
void * pInternal;
} mime_message_t;
The structure has the following fields:
This structure represents an RFC 822-compliant MIME message.
For more information, see Structure of a MIME Message and Building the MIME Message. For functions that manipulate this structure, see Message Functions.
mime_header_t, mime_basicPart_t, mime_multiPart_t, mime_messagePart_t
[Top] [MIME Structures]
Represents the MIME message part.
#include <mime.h>
typedef struct mime_messagePart
{
/* Common to all parts */
char * content_description;
mime_disp_type content_disposition;
char * content_disp_params;
/* content disposition parameters */
mime_content_type content_type;
char * content_subtype;
char * content_type_params;
char * contentID;
mime_header_t * extra_headers;
/* Additional X- and Content-headers */
/* Data that client cannot directly manipulate */
void * pInternal;
} mime_messagePart_t;
The structure has the following fields:
This structure represents the MIME message part.
For more information, see Structure of a MIME Message and Building the MIME Message. For functions that manipulate this structure, see Message Part Functions.
mime_basicPart_t, mime_multiPart_t
[Top] [MIME Structures]
Represents the MIME multipart content type.
#include <mime.h>
typedef struct mime_multiPart
{
/* Common to all parts */
char * content_description;
mime_disp_type content_disposition;
char * content_disp_params;
/* content disposition parameters */
mime_content_type content_type;
char * content_subtype;
char * content_type_params;
char * contentID;
mime_header_t * extra_headers;
/* Additional X- and Content-headers */
/* Data that client cannot directly manipulate */
void * pInternal;
} mime_multiPart_t;
The structure has the following fields:
This structure represents the MIME Multipart content type, which 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.
For more information, see Structure of a MIME Message and Building the MIME Message. For functions that manipulate this structure, see Multipart Functions.
mime_basicPart_t, mime_messagePart_t
[Top] [MIME Structures]
Represents the MIME output stream.
#include <mime.h>
typedef struct nsmail_outputstream mime_outputstream_t;
nsmail_outputstream_t, mime_inputstream_t
[Top] [MIME Structures]
Represents the MIME data sink used for MIME parsing.
#include <mimeparser.h>
typedef struct mimeDataSink
{
void (*header)( mimeDataSinkPtr_t pSink,
void *pCallbackObject,
char *name, char *value ); /* mime headers */
void (*contentType)( mimeDataSinkPtr_t pSink,
void *pCallbackObject,
int nContentType ); /* content type */
void (*contentSubType)( mimeDataSinkPtr_t pSink,
void *pCallbackObject,
char * contentSubType ); /* content sub type */
void (*contentTypeParams) ( mimeDataSinkPtr_t pSink,
void *pCallbackObject,
char * contentTypeParams );
/* content type extra parameters */
void (*contentID)( mimeDataSinkPtr_t pSink,
void *pCallbackObject,
char * contentID ); /* content ID */
void (*contentMD5)( mimeDataSinkPtr_t pSink,
void *pCallbackObject,
char * contentMD5 ); /* content MD5 */
void (*contentDisposition) ( mimeDataSinkPtr_t pSink,
void *pCallbackObject,
int nContentDisposition ); /* content disposition */
void (*contentDispParams)(mimeDataSinkPtr_t pSink,
void *pCallbackObject, char * contentDispParams ); /* content disposition parameters */
void (*contentDescription) ( mimeDataSinkPtr_t pSink,
void *pCallbackObject,
char * contentDescription ); /* content description */
void (*contentEncoding) ( mimeDataSinkPtr_t pSink,
void *pCallbackObject,
int nContentEncoding );/* content encoding */
void *(*startMessageLocalStorage) ( mimeDataSinkPtr_t pSink,
struct mime_message *m );
/* signal start of message, local storage version */
void *(*startMessage)(mimeDataSinkPtr_t pSink);
/* signal start of message */
void (*endMessage) ( mimeDataSinkPtr_t pSink,
void *pCallbackObject );
/* signal end of message */
void *(*startBasicPartLocalStorage)(
mimeDataSinkPtr_t pSink,
struct mime_basicPart *m );
/* signal start of basic part, local storage version */
void *(*startBasicPart)(mimeDataSinkPtr_t pSink);
/* signal start of basic part */
void (*bodyData) ( mimeDataSinkPtr_t pSink,
void *pCallbackObject,
char bodyData[], int len ); /* message data */
void (*endBasicPart)( mimeDataSinkPtr_t pSink,
void *pCallbackObject );
/* signal end of basic part */
void *(*startMultiPartLocalStorage)(
mimeDataSinkPtr_t pSink, struct mime_multiPart *m );
/* signal start of multipart, local storage version */
void *(*startMultiPart)(mimeDataSinkPtr_t pSink);
/* signal start of multipart */
void (*boundary)( mimeDataSinkPtr_t pSink,
void *pCallbackObject, char * boundary );
void (*endMultiPart)( mimeDataSinkPtr_t pSink,
void *pCallbackObject );
/* signal end of multipart */
void *(*startMessagePartLocalStorage)(
mimeDataSinkPtr_t pSink,
struct mime_messagePart *m );
/* signal start of message part, local storage version */
void *(*startMessagePart)(mimeDataSinkPtr_t pSink);
/* signal start of message part */
void (*endMessagePart)( mimeDataSinkPtr_t pSink,
void *pCallbackObject );
/* signal end of message part */
} mimeDataSink_t;
The structure has the following fields:
void (*header)( mimeDataSinkPtr_t pSink, void *pCallbackObject, char *name, char *value ); |
MIME headers. Parameters: Identifier of the data sink, identifier of the callback object, name and value portions of header's name:value pair.
|
void (*contentType)( mimeDataSinkPtr_t pSink, void *pCallbackObject, int nContentType ); |
Content type. Parameters: Identifier of the data sink, identifier of the callback object, content type of the body part.
|
void (*contentSubType)( mimeDataSinkPtr_t pSink, void *pCallbackObject, char * contentSubType ); |
Content sub type. Parameters: Identifier of the data sink, identifier of the callback object, content subtype of the body part.
|
void (*contentTypeParams)( mimeDataSinkPtr_t pSink, void *pCallbackObject, char * contentTypeParams ); |
Content type extra parameters. Parameters: Identifier of the data sink, identifier of the callback object, content type parameters.
|
void (*contentID)( mimeDataSinkPtr_t pSink, void *pCallbackObject, char * contentID ); |
Content ID. Parameters: Identifier of the data sink, identifier of the callback object, content identifier.
|
void (*contentMD5)( mimeDataSinkPtr_t pSink, void *pCallbackObject, char * contentMD5 ); |
Content MD5. Parameters: Identifier of the data sink, identifier of the callback object, contentMD5 of the body part.
|
void (*contentDisposition)( mimeDataSinkPtr_t pSink, void *pCallbackObject, int nContentDisposition ); |
Content disposition. Parameters: Identifier of the data sink, identifier of the callback object, content disposition.
|
void (*contentDispParams)( mimeDataSinkPtr_t pSink, void *pCallbackObject, char * contentDispParams ); |
Content disposition parameters. Parameters: Identifier of the data sink, identifier of the callback object, content disposition params.
|
void (*contentDescription)( mimeDataSinkPtr_t pSink, void *pCallbackObject, char * contentDescription ); |
Content description. Parameters: Identifier of the data sink, identifier of the callback object, content description of the body part.
|
void (*contentEncoding)( mimeDataSinkPtr_t pSink, void *pCallbackObject, int nContentEncoding ); |
Content encoding. Parameters: Identifier of the data sink, identifier of the callback object, encoding type for the message content.
|
void *(*startMessageLocalStorage)( mimeDataSinkPtr_t pSink, struct mime_message *m ); |
Signals start of message, local storage version. Parameters: Identifier of the data sink, MIME message that is starting.
|
void *(*startMessage)( mimeDataSinkPtr_t pSink); |
Signals start of message. Parameter: Identifier of the data sink.
|
void (*endMessage)( mimeDataSinkPtr_t pSink, void *pCallbackObject ); |
Signals end of message. Parameters: Identifier of the data sink, identifier of the callback object
|
void *( *startBasicPartLocalStorage)( mimeDataSinkPtr_t pSink, struct mime_basicPart *m ); |
Signals start of basic part, local storage version. Parameters: Identifier of the data sink, MIME basic part to store.
|
void *(*startBasicPart)( mimeDataSinkPtr_t pSink,); |
Signals start of basic part. Parameter: Identifier of the data sink.
|
void (*bodyData)( mimeDataSinkPtr_t pSink, void *pCallbackObject, char bodyData[], int len ); |
Message data. Parameters: Identifier of the data sink, identifier of the callback object, message part data, length of the data.
|
void (*endBasicPart)( mimeDataSinkPtr_t pSink, void *pCallbackObject ); |
Signals end of basic part. Parameters: Identifier of the data sink, identifier of the callback object.
|
void *(*startMultiPartLocalStorage)( mimeDataSinkPtr_t pSink, struct mime_multiPart *m ); |
Signals start of multipart, local storage version. Parameters: Identifier of the data sink, MIME multipart to store.
|
void *(*startMultiPart)( mimeDataSinkPtr_t pSink); |
Signals start of multipart. Parameter: Identifier of the data sink.
|
void (*boundary)( mimeDataSinkPtr_t pSink, void *pCallbackObject, char * boundary ); |
Generates and returns a boundary string for use in multiparts and for other uses as required. Parameters: Identifier of the data sink, identifier of the callback object, the boundary string.
|
void (*endMultiPart)( mimeDataSinkPtr_t pSink, void *pCallbackObject ); |
Signals end of multipart. Parameters: Identifier of the data sink, identifier of the callback object.
|
void *( *startMessagePartLocalStorage)( mimeDataSinkPtr_t pSink, struct mime_messagePart *m ); |
Signals start of message part, local storage version. Parameters: Identifier of the data sink, MIME message part to store.
|
void *(*startMessagePart)( mimeDataSinkPtr_t pSink); |
Signals start of message part. Parameter: Identifier of the data sink.
|
void (*endMessagePart)( mimeDataSinkPtr_t pSink, void *pCallbackObject ); |
Signals end of message part. Parameters: Identifier of the data sink, identifier of the callback object.
|
The MIME data sink structure is made up of function pointers and opaque data. You must define the functions yourself, and you must point these pointers to your functions. For more information, see SDK Response Sinks for C and Creating a Data Sink.
The function pointers serve as callbacks for many MIME functions. See MIME Data Sink Callbacks.
mimeDynamicParser_new
[Top] [
mimeDataSink_t
] [MIME Structures]
These definitions are shared by MIME API functions.
All error code definitions are found in mime.h
.
[Top]
All MIME error code definitions are found in mime.h
[Top] [MIME Definitions]
MIME Type Definitions
MIME Encoding Types
MIME Content Types
All C interface definitions are found in mime.h
and mimeparser.h
.
[Top] [MIME Definitions]
MIME Encoding Type definitions are found in mime.h
._
[Top] [MIME Definitions] [MIME Type Definitions]
MIME Disposition Type definitions are found in mime.h
.
[Top] [MIME Definitions] [MIME Type Definitions]
MIME Content Type definitions are found in mime.h
.
[Top] [MIME Definitions] [MIME Type Definitions]
MIME Buffer Size definitions are found in mime.h
.
[Top] [MIME Definitions]
Table of Contents | Previous
| Next
| Index
Last Updated: June 3, 1998
Copyright © 1998
Netscape Communications Corporation