- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
GSmtp::NewMessage Class Referenceabstract

An abstract class to allow the creation of a new message in the message store. More...

`#include <gnewmessage.h>`

Inheritance diagram for GSmtp::NewMessage:

## Public Member Functions
virtual void | addTo (const std::string &to, bool local)=0
| Adds a 'to' address. More...
virtual bool | addText (const std::string &line)=0
| Adds a line of content. Returns false on overflow. More...
virtual std::string | prepare (const std::string &auth_id, const std::string &peer_socket_address, const std::string &peer_socket_name, const std::string &peer_certificate)=0
| Prepares to store the message in the message store. More...
virtual void | commit ()=0
| Commits the prepare()d message to the store. More...
virtual unsigned long | id () const =0
| Returns the message's unique non-zero identifier. More...
virtual | ~NewMessage ()
| Destructor. More...

## Detailed Description

An abstract class to allow the creation of a new message in the message store.

See also
  GSmtp::MessageStore, GSmtp::MessageStore::newMessage()

Definition at line 39 of file gnewmessage.h.

## Constructor & Destructor Documentation

GSmtp::NewMessage::~NewMessage | ( |  | ) |
| virtual

Destructor.

Rolls back any prepare()d storage if un-commit()ed.

Definition at line 27 of file gnewmessage.cpp.

## Member Function Documentation

virtual bool GSmtp::NewMessage::addText | ( | const std::string & | line | ) |
| pure virtual

Adds a line of content. Returns false on overflow.

Implemented in GSmtp::NewFile.

virtual void GSmtp::NewMessage::addTo | ( | const std::string & | to,
|  | bool | local
| ) |  |
| pure virtual

Adds a 'to' address.

Implemented in GSmtp::NewFile.

virtual void GSmtp::NewMessage::commit | ( |  | ) |
| pure virtual

Commits the prepare()d message to the store.

Implemented in GSmtp::NewFile.

virtual unsigned long GSmtp::NewMessage::id | ( |  | ) | const
| pure virtual

Returns the message's unique non-zero identifier.

Implemented in GSmtp::NewFile.

virtual std::string GSmtp::NewMessage::prepare | ( | const std::string & | auth_id,
|  | const std::string & | peer_socket_address,
|  | const std::string & | peer_socket_name,
|  | const std::string & | peer_certificate
| ) |  |
| pure virtual

Prepares to store the message in the message store.

Returns the location of the pre-commit()ed message.

Implemented in GSmtp::NewFile.

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

- gnewmessage.h
- gnewmessage.cpp