21#ifndef G_SMTP_STORED_MESSAGE_H
22#define G_SMTP_STORED_MESSAGE_H
51 virtual std::string
from()
const = 0 ;
54 virtual std::string
to( std::size_t )
const = 0 ;
77 virtual void fail(
const std::string & reason ,
int reason_code ) = 0 ;
80 virtual MessageStore::BodyType
bodyType()
const = 0 ;
A somewhat opaque identifer for a GStore::MessageStore message id.
An abstract interface for messages which have come from the store.
virtual std::string forwardToAddress() const =0
Returns the forwardTo() address or the empty string.
virtual void destroy()=0
Deletes the message within the store.
virtual void fail(const std::string &reason, int reason_code)=0
Marks the message as failed within the store.
virtual std::istream & contentStream()=0
Returns a reference to the content stream.
virtual std::string to(std::size_t) const =0
Returns the requested envelope non-local recipient or the empty string if out of range.
virtual std::string from() const =0
Returns the envelope 'from' field.
virtual std::string clientAccountSelector() const =0
Returns the client account selector or the empty string.
virtual void editRecipients(const G::StringArray &)=0
Updates the message's remote recipients, typically to the sub-set that have not received it successfu...
virtual void close()=0
Releases the message to allow external editing.
virtual std::string reopen()=0
Reverses a close(), returning the empty string on success or an error reason.
virtual std::size_t contentSize() const =0
Returns the content size.
virtual std::string location() const =0
Returns the message location.
virtual std::string fromAuthOut() const =0
Returns the outgoing "mail from" auth parameter, either empty, xtext-encoded or "<>".
virtual std::string fromAuthIn() const =0
Returns the incoming "mail from" auth parameter, either empty, xtext-encoded or "<>".
virtual MessageStore::BodyType bodyType() const =0
Returns the message body type.
virtual std::string authentication() const =0
Returns the original session authentication id.
virtual MessageId id() const =0
Returns the message identifier.
virtual std::size_t toCount() const =0
Returns the number of non-local recipients.
virtual ~StoredMessage()=default
Destructor.
virtual std::string forwardTo() const =0
Returns the routing override or the empty string.
virtual bool utf8Mailboxes() const =0
Returns true if the mail-from command should have SMTPUTF8 (RFC-6531).
std::vector< std::string > StringArray
A std::vector of std::strings.