VMime
fileContentHandler Class Reference
Inheritance diagram for fileContentHandler:
Collaboration diagram for fileContentHandler:

Public Member Functions

 fileContentHandler ()
 
 fileContentHandler (shared_ptr< utility::file > file, const vmime::encoding &enc=NO_ENCODING)
 
 ~fileContentHandler ()
 
 fileContentHandler (const fileContentHandler &cts)
 
fileContentHandleroperator= (const fileContentHandler &cts)
 
shared_ptr< contentHandlerclone () const
 
void setData (shared_ptr< utility::file > file, const vmime::encoding &enc=NO_ENCODING)
 
- Public Member Functions inherited from streamContentHandler
 streamContentHandler ()
 
 streamContentHandler (shared_ptr< utility::inputStream > is, const size_t length, const vmime::encoding &enc=NO_ENCODING)
 
 ~streamContentHandler ()
 
 streamContentHandler (const streamContentHandler &cts)
 
streamContentHandleroperator= (const streamContentHandler &cts)
 
shared_ptr< contentHandlerclone () const
 
void setData (shared_ptr< utility::inputStream > is, const size_t length, const vmime::encoding &enc=NO_ENCODING)
 
void generate (utility::outputStream &os, const vmime::encoding &enc, const size_t maxLineLength=lineLengthLimits::infinite) const
 
void extract (utility::outputStream &os, utility::progressListener *progress=NULL) const
 
void extractRaw (utility::outputStream &os, utility::progressListener *progress=NULL) const
 
size_t getLength () const
 
bool isEncoded () const
 
const vmime::encodinggetEncoding () const
 
bool isEmpty () const
 
bool isBuffered () const
 
void setContentTypeHint (const mediaType &type)
 
const mediaType getContentTypeHint () const
 
- Public Member Functions inherited from contentHandler
virtual ~contentHandler ()
 

Additional Inherited Members

- Static Public Attributes inherited from contentHandler
static const vmime::encoding NO_ENCODING
 
- Protected Member Functions inherited from object
 object ()
 
 object (const object &)
 
objectoperator= (const object &)
 
virtual ~object ()
 

Detailed Description

A content handler which obtains its data from a file.

Constructor & Destructor Documentation

Creates a new empty content handler.

No data can be extracted until a file is attached using setData() function.

Returns
a reference to a new content handler
fileContentHandler ( shared_ptr< utility::file file,
const vmime::encoding enc = NO_ENCODING 
)

Creates a new content handler using a file.

Parameters
filefile from which data will be obtained
encset to anything other than NO_ENCODING if the data contained in the file is already encoded with the specified encoding
Returns
a reference to a new content handler

Member Function Documentation

shared_ptr< contentHandler > clone ( ) const
virtual

Return a copy of this object.

Returns
copy of this object

Implements contentHandler.

fileContentHandler & operator= ( const fileContentHandler cts)
void setData ( shared_ptr< utility::file file,
const vmime::encoding enc = NO_ENCODING 
)

Sets the data managed by this content handler.

Parameters
filefile from which data will be obtained
encset to anything other than NO_ENCODING if the data contained in the file is already encoded with the specified encoding

References streamContentHandler::setData().

Referenced by fileContentHandler::fileContentHandler(), and fileContentHandler::operator=().


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