VMime
defaultAttachment Class Reference

#include <defaultAttachment.hpp>

Inheritance diagram for defaultAttachment:
Collaboration diagram for defaultAttachment:

Public Member Functions

 defaultAttachment (shared_ptr< const contentHandler > data, const encoding &enc, const mediaType &type, const text &desc=NULL_TEXT, const word &name=NULL_WORD)
 defaultAttachment (shared_ptr< const contentHandler > data, const mediaType &type, const text &desc=NULL_TEXT, const word &name=NULL_WORD)
 defaultAttachment (const defaultAttachment &attach)
 ~defaultAttachment ()
defaultAttachmentoperator= (const defaultAttachment &attach)
const mediaType getType () const
const text getDescription () const
const word getName () const
const shared_ptr< const contentHandlergetData () const
const encoding getEncoding () const
shared_ptr< const objectgetPart () const
shared_ptr< const headergetHeader () const
Public Member Functions inherited from attachment
virtual ~attachment ()

Protected Member Functions

 defaultAttachment ()
virtual void generatePart (shared_ptr< bodyPart > part) const
Protected Member Functions inherited from attachment
 attachment ()
Protected Member Functions inherited from object
 object ()
 object (const object &)
objectoperator= (const object &)
virtual ~object ()

Protected Attributes

mediaType m_type
text m_desc
shared_ptr< const contentHandlerm_data
encoding m_encoding
word m_name

Detailed Description

Default implementation for attachments.

Constructor & Destructor Documentation

◆ defaultAttachment() [1/4]

defaultAttachment ( )
protected

Referenced by defaultAttachment(), and operator=().

◆ defaultAttachment() [2/4]

defaultAttachment ( shared_ptr< const contentHandler > data,
const encoding & enc,
const mediaType & type,
const text & desc = NULL_TEXT,
const word & name = NULL_WORD )

References m_data, m_desc, m_encoding, m_name, and m_type.

◆ defaultAttachment() [3/4]

defaultAttachment ( shared_ptr< const contentHandler > data,
const mediaType & type,
const text & desc = NULL_TEXT,
const word & name = NULL_WORD )

References m_data, m_desc, m_encoding, m_name, and m_type.

◆ defaultAttachment() [4/4]

defaultAttachment ( const defaultAttachment & attach)

◆ ~defaultAttachment()

Member Function Documentation

◆ generatePart()

void generatePart ( shared_ptr< bodyPart > part) const
protectedvirtual

◆ getData()

const shared_ptr< const contentHandler > getData ( ) const
virtual

Return the data contained in this attachment.

Returns
attachment data

Implements attachment.

References m_data.

◆ getDescription()

const text getDescription ( ) const
virtual

Return the description of this attachment.

Returns
attachment description, or an empty text if no description is available

Implements attachment.

References m_desc.

◆ getEncoding()

const encoding getEncoding ( ) const
virtual

Return the encoding used for this attachment.

Returns
attachment data encoding

Implements attachment.

References m_encoding.

◆ getHeader()

shared_ptr< const header > getHeader ( ) const
virtual

Return the header of the attachment part.

Returns
attachment part header or NULL if the attachment is not attached to a part

Implements attachment.

◆ getName()

const word getName ( ) const
virtual

Return the (file) name of this attachment.

Returns
attachment name, or an empty word if no name is available

Implements attachment.

References m_name.

◆ getPart()

shared_ptr< const object > getPart ( ) const
virtual

Return the part in which the attachment has been found.

This can be a vmime::bodyPart or a vmime::net::part object.

Returns
attachment part or NULL if the attachment is not attached to a part

Implements attachment.

◆ getType()

const mediaType getType ( ) const
virtual

Return the media type of this attachment.

Returns
content type of the attachment

Implements attachment.

References m_type.

◆ operator=()

Member Data Documentation

◆ m_data

◆ m_desc

◆ m_encoding

◆ m_name

word m_name
protected

Name/filename (eg.

"sunset.jpg")

Referenced by defaultAttachment(), defaultAttachment(), defaultAttachment(), generatePart(), getName(), and operator=().

◆ m_type


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