VMime
messagePart Class Referenceabstract

#include <message.hpp>

Inheritance diagram for messagePart:
Collaboration diagram for messagePart:

Public Member Functions

virtual shared_ptr< const messageStructuregetStructure () const =0
 
virtual shared_ptr< messageStructuregetStructure ()=0
 
virtual shared_ptr< const headergetHeader () const =0
 
virtual const mediaTypegetType () const =0
 
virtual size_t getSize () const =0
 
virtual size_t getNumber () const =0
 
shared_ptr< const messagePartgetPartAt (const size_t pos) const
 
shared_ptr< messagePartgetPartAt (const size_t pos)
 
size_t getPartCount () const
 

Protected Member Functions

 messagePart ()
 
 messagePart (const messagePart &)
 
virtual ~messagePart ()
 
- Protected Member Functions inherited from object
 object ()
 
 object (const object &)
 
objectoperator= (const object &)
 
virtual ~object ()
 

Detailed Description

A MIME part in a message.

Constructor & Destructor Documentation

◆ messagePart() [1/2]

messagePart ( )
protected

◆ messagePart() [2/2]

messagePart ( const messagePart )
protected

◆ ~messagePart()

virtual ~messagePart ( )
protectedvirtual

Member Function Documentation

◆ getHeader()

virtual shared_ptr< const header > getHeader ( ) const
pure virtual

Return the header section for this part (you must fetch header before using this function: see message::fetchPartHeader).

Returns
header section

Implemented in IMAPMessagePart, and maildirMessagePart.

◆ getNumber()

virtual size_t getNumber ( ) const
pure virtual

Return the part sequence number (index).

The first part is at index zero.

Returns
part number

Implemented in IMAPMessagePart, and maildirMessagePart.

◆ getPartAt() [1/2]

shared_ptr< messagePart > getPartAt ( const size_t  pos)

Return the sub-part at the specified position (zero is the first part).

Parameters
posindex of the sub-part
Returns
sub-part at position 'pos'

References vmime::dynamicCast(), and messagePart::getStructure().

◆ getPartAt() [2/2]

shared_ptr< const messagePart > getPartAt ( const size_t  pos) const

Return the sub-part at the specified position (zero is the first part).

Parameters
posindex of the sub-part
Returns
sub-part at position 'pos'

References vmime::dynamicCast(), and messagePart::getStructure().

◆ getPartCount()

size_t getPartCount ( ) const

Return the number of sub-parts in this part.

Returns
number of sub-parts

References messagePart::getStructure().

◆ getSize()

virtual size_t getSize ( ) const
pure virtual

Return the size of this part.

Returns
size of the part (in bytes)

Implemented in IMAPMessagePart, and maildirMessagePart.

◆ getStructure() [1/2]

virtual shared_ptr< const messageStructure > getStructure ( ) const
pure virtual

Return the structure of this part.

Returns
structure of the part

Implemented in IMAPMessagePart, and maildirMessagePart.

Referenced by messagePart::getPartAt(), messagePart::getPartAt(), and messagePart::getPartCount().

◆ getStructure() [2/2]

virtual shared_ptr< messageStructure > getStructure ( )
pure virtual

Return the structure of this part.

Returns
structure of the part

Implemented in IMAPMessagePart, and maildirMessagePart.

◆ getType()

virtual const mediaType & getType ( ) const
pure virtual

Return the media-type of the content in this part.

Returns
content media type

Implemented in IMAPMessagePart, and maildirMessagePart.


The documentation for this class was generated from the following files: