GSmtp::StoredFile Class Reference

A concete derived class implementing the StoredMessage interface. More...

#include <gstoredfile.h>

Inheritance diagram for GSmtp::StoredFile:

GSmtp::StoredMessage

List of all members.

Public Member Functions

 StoredFile (FileStore &store, const G::Path &envelope_path)
 Constructor.
virtual ~StoredFile ()
 Destructor.
bool lock ()
 Locks the file by renaming the envelope file.
bool readEnvelope (std::string &reason, bool check_for_no_remote_recipients)
 Reads the envelope.
bool openContent (std::string &reason)
 Opens the content file.
virtual std::string name () const
 Final override from GSmtp::StoredMessage.
virtual std::string location () const
 Final override from GSmtp::StoredMessage.
virtual bool eightBit () const
 Final override from GSmtp::StoredMessage.
virtual const std::string & from () const
 Final override from GSmtp::StoredMessage.
virtual const G::Stringsto () const
 Final override from GSmtp::StoredMessage.
virtual std::string authentication () const
 Final override from GSmtp::StoredMessage.
virtual void destroy ()
 Final override from GSmtp::StoredMessage.
virtual void fail (const std::string &reason, int reason_code)
 Final override from GSmtp::StoredMessage.
virtual std::auto_ptr
< std::istream > 
extractContentStream ()
 Final override from GSmtp::StoredMessage.
virtual size_t remoteRecipientCount () const
 Final override from GSmtp::StoredMessage.
virtual size_t errorCount () const
 Final override from GSmtp::StoredMessage.
virtual void sync ()
 Final override from GSmtp::StoredMessage.


Detailed Description

A concete derived class implementing the StoredMessage interface.

Definition at line 45 of file gstoredfile.h.


Constructor & Destructor Documentation

GSmtp::StoredFile::StoredFile ( FileStore store,
const G::Path envelope_path 
)

Constructor.

Definition at line 33 of file gstoredfile.cpp.

References G::Path::basename(), and G_DEBUG.

GSmtp::StoredFile::~StoredFile (  )  [virtual]

Destructor.

Unlocks the file if it has been lock()ed but not destroy()ed or fail()ed.

Definition at line 46 of file gstoredfile.cpp.


Member Function Documentation

bool GSmtp::StoredFile::lock (  ) 

Locks the file by renaming the envelope file.

Used by FileStore and FileIterator.

Definition at line 247 of file gstoredfile.cpp.

References G::Path::basename(), G_LOG, G::File::rename(), G::Path::str(), and GSmtp::FileStore::updated().

bool GSmtp::StoredFile::readEnvelope ( std::string &  reason,
bool  check_for_no_remote_recipients 
)

Reads the envelope.

Returns false on error. Used by FileStore and FileIterator.

Definition at line 77 of file gstoredfile.cpp.

bool GSmtp::StoredFile::openContent ( std::string &  reason  ) 

Opens the content file.

Returns false on error. Used by FileStore and FileIterator.

Definition at line 191 of file gstoredfile.cpp.

References G::Path::basename(), G_DEBUG, and G::Path::str().

std::string GSmtp::StoredFile::name (  )  const [virtual]

Final override from GSmtp::StoredMessage.

Implements GSmtp::StoredMessage.

Definition at line 57 of file gstoredfile.cpp.

std::string GSmtp::StoredFile::location (  )  const [virtual]

Final override from GSmtp::StoredMessage.

Implements GSmtp::StoredMessage.

Definition at line 62 of file gstoredfile.cpp.

References G::Path::str().

bool GSmtp::StoredFile::eightBit (  )  const [virtual]

Final override from GSmtp::StoredMessage.

Implements GSmtp::StoredMessage.

Definition at line 67 of file gstoredfile.cpp.

const std::string & GSmtp::StoredFile::from (  )  const [virtual]

Final override from GSmtp::StoredMessage.

Implements GSmtp::StoredMessage.

Definition at line 320 of file gstoredfile.cpp.

const G::Strings & GSmtp::StoredFile::to (  )  const [virtual]

Final override from GSmtp::StoredMessage.

Implements GSmtp::StoredMessage.

Definition at line 325 of file gstoredfile.cpp.

std::string GSmtp::StoredFile::authentication (  )  const [virtual]

Final override from GSmtp::StoredMessage.

Implements GSmtp::StoredMessage.

Definition at line 357 of file gstoredfile.cpp.

void GSmtp::StoredFile::destroy (  )  [virtual]

Final override from GSmtp::StoredMessage.

Implements GSmtp::StoredMessage.

Definition at line 308 of file gstoredfile.cpp.

References G::Path::basename(), G_LOG, and G::File::remove().

void GSmtp::StoredFile::fail ( const std::string &  reason,
int  reason_code 
) [virtual]

Final override from GSmtp::StoredMessage.

Implements GSmtp::StoredMessage.

Definition at line 277 of file gstoredfile.cpp.

References G::Path::basename(), G::File::exists(), G_LOG_S, and G::File::rename().

std::auto_ptr< std::istream > GSmtp::StoredFile::extractContentStream (  )  [virtual]

Final override from GSmtp::StoredMessage.

Implements GSmtp::StoredMessage.

Definition at line 330 of file gstoredfile.cpp.

References G_ASSERT.

size_t GSmtp::StoredFile::remoteRecipientCount (  )  const [virtual]

Final override from GSmtp::StoredMessage.

Implements GSmtp::StoredMessage.

Definition at line 347 of file gstoredfile.cpp.

size_t GSmtp::StoredFile::errorCount (  )  const [virtual]

Final override from GSmtp::StoredMessage.

Implements GSmtp::StoredMessage.

Definition at line 352 of file gstoredfile.cpp.

void GSmtp::StoredFile::sync (  )  [virtual]

Final override from GSmtp::StoredMessage.

Implements GSmtp::StoredMessage.

Definition at line 72 of file gstoredfile.cpp.


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

Generated on Fri Apr 18 15:56:14 2008 for E-MailRelay by  doxygen 1.5.5