A concrete derived class implementing the NewMessage interface. More...
#include <gnewfile.h>
Public Member Functions | |
NewFile (const std::string &from, FileStore &store, unsigned long max_size=0UL) | |
Constructor. The FileStore reference is kept. More... | |
virtual | ~NewFile () |
Destructor. More... | |
virtual void | addTo (const std::string &to, bool local) |
Final override from GSmtp::NewMessage. More... | |
virtual bool | addText (const std::string &line) |
Final override from GSmtp::NewMessage. 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) |
Final override from GSmtp::NewMessage. More... | |
virtual void | commit () |
Final override from GSmtp::NewMessage. More... | |
virtual unsigned long | id () const |
Final override from GSmtp::NewMessage. More... | |
G::Path | contentPath () const |
Returns the path of the content file. More... | |
Public Member Functions inherited from GSmtp::NewMessage | |
virtual | ~NewMessage () |
Destructor. More... | |
A concrete derived class implementing the NewMessage interface.
Writes itself to the i/o streams supplied by MessageStoreImp.
Definition at line 43 of file gnewfile.h.
GSmtp::NewFile::NewFile | ( | const std::string & | from, |
FileStore & | store, | ||
unsigned long | max_size = 0UL |
||
) |
Constructor. The FileStore reference is kept.
Definition at line 39 of file gnewfile.cpp.
References GSmtp::FileStore::contentPath(), G_LOG, GSmtp::FileStore::newSeq(), and GSmtp::FileStore::stream().
|
virtual |
Destructor.
If the new message has not been commit()ed then the files are deleted.
Definition at line 60 of file gnewfile.cpp.
References G_DEBUG.
|
virtual |
Final override from GSmtp::NewMessage.
Implements GSmtp::NewMessage.
Definition at line 123 of file gnewfile.cpp.
|
virtual |
Final override from GSmtp::NewMessage.
Implements GSmtp::NewMessage.
Definition at line 115 of file gnewfile.cpp.
|
virtual |
Final override from GSmtp::NewMessage.
The implementation renames the ".new" envelope file, removing the extension.
Implements GSmtp::NewMessage.
Definition at line 107 of file gnewfile.cpp.
G::Path GSmtp::NewFile::contentPath | ( | ) | const |
Returns the path of the content file.
Definition at line 251 of file gnewfile.cpp.
|
virtual |
Final override from GSmtp::NewMessage.
Implements GSmtp::NewMessage.
Definition at line 246 of file gnewfile.cpp.
|
virtual |
Final override from GSmtp::NewMessage.
The implementation flushes and closes the content stream, creates a new envelope file (".new"), and does any local 'delivery' by creating ".local" copies. The path to the content file is returned.
Implements GSmtp::NewMessage.
Definition at line 83 of file gnewfile.cpp.