21#ifndef G_SMTP_NEW_FILE_H
22#define G_SMTP_NEW_FILE_H
51 G_EXCEPTION( FileError ,
tx(
"message store error") )
54 const std::string & from_auth_out , std::size_t max_size ) ;
73 void commit(
bool strict )
override ;
75 std::string location()
const override ;
76 void addTo(
const std::string & to ,
bool local , MessageStore::AddressStyle )
override ;
77 NewMessage::Status addContent(
const char * , std::size_t )
override ;
78 std::size_t contentSize()
const override ;
79 void prepare(
const std::string & auth_id ,
const std::string & peer_socket_address ,
80 const std::string & peer_certificate )
override ;
84 enum class State { New , Normal } ;
93 std::unique_ptr<std::ofstream> m_content ;
94 bool m_committed {
false} ;
95 bool m_saved {
false} ;
96 std::size_t m_size {0U} ;
97 std::size_t m_max_size ;
A structure containing the contents of an envelope file, with support for file reading,...
A concrete implementation of the MessageStore interface dealing in paired flat files.
A somewhat opaque identifer for a GStore::MessageStore message id.
A concrete class implementing the GStore::NewMessage interface using files.
G::Path contentPath() const
Returns the path of the content file.
NewFile(FileStore &store, const std::string &from, const MessageStore::SmtpInfo &, const std::string &from_auth_out, std::size_t max_size)
Constructor.
~NewFile() override
Destructor.
An abstract class to allow the creation of a new message in the message store.
A Path object represents a file system path.
constexpr const char * tx(const char *p) noexcept
A briefer alternative to G::gettext_noop().
Low-level file-system operations for GStore::FileStore.
Information on the SMTP options used when submitted.