E-MailRelay
Public Member Functions | List of all members
GSmtp::NewFile Class Reference

A concrete derived class implementing the GSmtp::NewMessage interface. More...

#include <gnewfile.h>

+ Inheritance diagram for GSmtp::NewFile:

Public Member Functions

 NewFile (FileStore &store, const std::string &from, const std::string &from_auth_in, const std::string &from_auth_out, std::size_t max_size, bool test_for_eight_bit)
 Constructor. The FileStore reference is kept. More...
 
 ~NewFile () override
 Destructor. More...
 
G::Path contentPath () const
 Returns the path of the content file.
 
 NewFile (const NewFile &)=delete
 
 NewFile (NewFile &&)=delete
 
void operator= (const NewFile &)=delete
 
void operator= (NewFile &&)=delete
 
- Public Member Functions inherited from GSmtp::NewMessage
virtual void addTo (const std::string &to, bool local)=0
 Adds a 'to' address.
 
virtual bool addText (const char *, std::size_t)=0
 Adds a line of content, typically ending with CR-LF. More...
 
virtual bool prepare (const std::string &session_auth_id, const std::string &peer_socket_address, const std::string &peer_certificate)=0
 Prepares to store the message in the message store. More...
 
virtual void commit (bool strict)=0
 Commits the prepare()d message to the store. More...
 
virtual std::string location () const =0
 Returns the message's unique location.
 
virtual MessageId id () const =0
 Returns the message's unique identifier.
 
bool addTextLine (const std::string &)
 A convenience function that calls addText() taking a string parameter and adding CR-LF. More...
 
virtual ~NewMessage ()=default
 Destructor. More...
 

Detailed Description

A concrete derived class implementing the GSmtp::NewMessage interface.

Writes itself to the i/o streams supplied by GSmtp::FileStore.

Definition at line 42 of file gnewfile.h.

Constructor & Destructor Documentation

◆ NewFile()

GSmtp::NewFile::NewFile ( FileStore store,
const std::string &  from,
const std::string &  from_auth_in,
const std::string &  from_auth_out,
std::size_t  max_size,
bool  test_for_eight_bit 
)

Constructor. The FileStore reference is kept.

Definition at line 37 of file gnewfile.cpp.

◆ ~NewFile()

GSmtp::NewFile::~NewFile ( )
override

Destructor.

If the new message has not been commit()ed then the files are deleted.

Definition at line 57 of file gnewfile.cpp.


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