Custom MIME section information classes

MIME section information objects get instantiated by:

x::mime::sectioninfo is a reference to a reference-counted x::mime::sectioninfoObj object. This object contains the size of the header and the body portion of the MIME object, and a std::vector of x::mime::const_sectioninfo for the entities in a multipart MIME entity (or the sole message/rfc822).

It's possible to subclass x::mime::sectioninfoObj in order to store additional custom metadata about each MIME section, and have the entity parser functions take care of constructing all the section information objects for all MIME entities in the document. The requirements for a subclass of a x::mime::sectioninfoObj are:

A reference to the custom subclass gets passed to:

examples/mime/bodydecoder5.C is a modified version of bodydecoder3.C that shows how to use a custom section information class that holds each MIME entity's MIME type, that's added to the output of the MIME document's structure:


$ cat bodydecoder3.txt
Subject: test
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="xxx"

--xxx
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Hello=A0
--xxx
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

world!

--xxx--
$ ./bodydecoder <bodydecoder3.txt
Hello world!
MIME section 1 (multipart/mixed) starts at character offset 0
  79 bytes in the header, 217 bytes in the body.
  4 lines in the header, 12 lines in the body.

MIME section 1.1 (text/plain) starts at character offset 85
  90 bytes in the header, 8 bytes in the body.
  3 lines in the header, 1 lines in the body.
  No trailing newline

MIME section 1.2 (text/plain) starts at character offset 190
  90 bytes in the header, 7 bytes in the body.
  3 lines in the header, 1 lines in the body.