mimepp Namespace Reference

Contains all Hunny MIME++ classes and global functions. More...


Classes

struct  ByteBuffer
 Byte buffer structure. More...
struct  CharBuffer
 Character buffer structure. More...
class  Class
 Class that provides run-time type information More...
class  String
class  TextUtil
 Class that provides text utility functions More...
class  Node
 Abstract base class for all classes representing message components. More...
class  Parameter
 Class that represents a MIME field body parameter More...
class  FieldBody
 Class that represents a header field body More...
class  MsgId
 Class that represents an RFC 2822 message ID More...
class  EncodedWord
 Class that represents an encoded word in a header field More...
class  Text
 Class that represents text in an unstructured header field body More...
class  Address
 Abstract class that represents an RFC 2822 mail address. More...
class  Mailbox
 Class that represents an RFC 2822 mailbox More...
class  AddressList
 Class that represents a list of RFC 2822 mail addresses More...
class  MailboxList
 Class that represents a list of RFC 2822 mailboxes More...
class  Group
 Class that represents an RFC 2822 address group More...
class  DateTime
 Class that represents an RFC 2822 date-time More...
class  DispositionType
 Class that represents a MIME content-disposition field body More...
class  Stamp
 Class that represents the field body of a "Received" header field. More...
class  TransferEncodingType
 Class that represents a MIME content-transfer-encoding field body More...
class  MediaType
 Class that represents a MIME media-type More...
class  Field
 Class that represents a header field More...
class  Headers
 Class that represents the collection of header fields in a message or body part More...
class  Body
 Class that represents the body of a message or body part More...
class  Entity
 Abstract class that represents a MIME entity. More...
class  BodyPart
 Class that represents a MIME body part More...
class  Message
 Class that represents an RFC 2822/MIME message More...
class  AppleFile
 Class for packing and unpacking AppleSingle and AppleDouble data More...
class  BinHex
 Class for converting files to or from BinHex 4.0 format More...
class  Uuencode
 Class for performing uuencode or uudecode operations More...
class  Base64Decoder
 Class that performs base64 decoding. More...
class  Base64Encoder
 Class that performs base64 encoding. More...
class  QuotedPrintableDecoder
 Class that performs quoted-printable decoding. More...
class  QuotedPrintableEncoder
 Class that performs quoted-printable encoding. More...
class  TextDecoder
 Class that performs text character decoding. More...
class  TextEncoder
 Class that performs text character encoding. More...
class  TnefAttachment
 Class that represents a TNEF attachment. More...
class  TnefDecoder
 Utility class that performs TNEF attachment decoding. More...

Functions

MIMEPP_API bool Initialize ()
 Initializes the library.
MIMEPP_API void Finalize ()
 Finalizes the library.
MIMEPP_API void setMaxDepth (int maxDepth)
 Sets the maximum depth of nested body parts for the parser.
MIMEPP_API void setTextConverterImpl (int choice)
 Sets the selection for the text converter implementation.
MIMEPP_API void setHeaderParserOption (int option)
 Sets the option for parsing the entity headers.
MIMEPP_API const char * versionInfo ()
 Gets the version information string.
MIMEPP_API const char * buildInfo ()
 Gets the build information string.


Detailed Description

The mimepp namespace contains all Hunny MIME++ classes and some global utility functions.


Function Documentation

MIMEPP_API const char * buildInfo (  ) 

Gets the build information string.

This function is helpful for debugging, as it provides accurate information about the build of the Hunny MIME++ library that your application uses.

The returned string is static. You must not attempt to free the returned string.

Returns:
build information

void Finalize (  ) 

Finalizes the library.

Your application may optionally call this global function. Normally, you don't need to call Finalize(), because the operating system cleans up all application resources. However, if you run a utility to check for memory leaks, you may choose to call Finalize() just before your application exits.

bool Initialize (  ) 

Initializes the library.

Your application must call this global function at application start-up time, before you create any threads.

MIMEPP_API void setHeaderParserOption ( int  option  ) 

Sets the option for parsing the entity headers.

When an entity (message or body part) has invalid syntax, there is no standard way to parse it. Furthermore, different individuals have different ideas about how the parser should function. In the specific case of parsing an entity into the headers and body, Hunny MIME++ provides this option to choose between two different ways for the parser to operate.

The option determines how the parser operates when presented with an entity like this:

 From: yogiberra@example.com
 Subject: When you come to a fork in the road
 take it.

 The future ain't what it used to be.
 

In this message, it seems that the Subject line was incorrectly wrapped: there should be a space before "take it". However, there are also many messages that omit the blank line between the headers and the body, and the line "take it" could also be the first line of the body.

If you set the option to mimepp::HEADER_PARSER_OPTION_STOP, the parser stops parsing the headers at the first line that is not valid syntax for the headers. With this option, the line "take it." is the first line of the body.

If you set the option to mimepp::HEADER_PARSER_OPTION_SKIP, the parser skips lines with bad header syntax and finds the end of the headers when it reaches a blank line. With this option, the line "take it" is part of the Subject header field. The first line of the body is "The future ..." (The full Subject is "When you come to a fork in the road\r\ntake it", which contains the end of line characters. "\r\n" could also be just "\n".)

The default value is mimepp::HEADER_PARSER_OPTION_STOP.

Parameters:
option the selected option

MIMEPP_API void setMaxDepth ( int  maxDepth  ) 

Sets the maximum depth of nested body parts for the parser.

In order to avoid the possibility of a denial-of-service attack, Hunny MIME++ limits the maximum depth of nested body parts that the parser will automatically parse. The default value is 5, which is enough for virtually all email messages. However, the option is configurable via this function. You should call this function only at application start-up time if the default value is not acceptable.

Parameters:
maxDepth the maximum depth value

MIMEPP_API void setTextConverterImpl ( int  choice  ) 

Sets the selection for the text converter implementation.

Hunny MIME++ uses external libraries or components to perform text encoding conversions. Developers may choose the implementation at application start-up time. The implementation options include the following:

  • ICU (default) -- open source International Components for Unicode

  • MLang (Windows only) -- MLang is a component of Internet Explorer.

  • libiconv (Unix/Linux only) -- libiconv is the standard operating system facility for character encoding conversions on Unix.

Hunny MIME++ provides an enumerated value for each option. The following enumerated values are defined in the include file mimepp/mimepp.h:

ICU
DEFAULT = ICU
MLANG
LIBICONV

The default value is ICU.

To select an implementation that is not the default, you may call this function at application start-up time, before you call mimepp::Initialize().

Parameters:
choice the text converter selection

MIMEPP_API const char * versionInfo (  ) 

Gets the version information string.

This function is helpful for debugging, as it provides accurate information about the version of the Hunny MIME++ library that your application uses.

The returned string is static. You must not attempt to free the returned string.

Returns:
version information

Copyright © 2001-2009 Hunny Software, Inc. All rights reserved.