21#ifndef G_FILE_DELIVERY_H
22#define G_FILE_DELIVERY_H
52 G_EXCEPTION( EnvelopeWriteError ,
tx(
"delivery: cannot write envelope file") )
53 G_EXCEPTION( ContentWriteError ,
tx(
"delivery: cannot write content file") )
54 G_EXCEPTION( MkdirError ,
tx(
"delivery: cannot create delivery directory") )
55 G_EXCEPTION( MaildirCopyError ,
tx(
"delivery: cannot write maildir tmp file") )
56 G_EXCEPTION( MaildirMoveError ,
tx(
"delivery: cannot move maildir file") )
59 bool hardlink {
false} ;
60 bool no_delete {
false} ;
61 bool pop_by_name {
false} ;
70 bool hardlink =
false ,
bool pop_by_name =
false ) ;
96 bool deliver(
const MessageId & ,
bool )
override ;
102 static std::string mailbox(
const Config & ,
const std::string & ) ;
103 static std::string id(
const G::Path & ) ;
104 static std::string hostname() ;
A structure containing the contents of an envelope file, with support for file reading,...
An implementation of the MessageDelivery interface that delivers message files to mailboxes.
static void deliverTo(FileStore &, std::string_view prefix, const G::Path &dst_dir, const G::Path &envelope_path, const G::Path &content_path, bool hardlink=false, bool pop_by_name=false)
Low-level function to copy a single message into a mailbox sub-directory or a pop-by-name sub-directo...
FileDelivery(FileStore &, const Config &)
Constructor.
A concrete implementation of the MessageStore interface dealing in paired flat files.
An interface to deliver a message to its local recipients' mailboxes.
A somewhat opaque identifer for a GStore::MessageStore message id.
A Path object represents a file system path.
std::vector< std::string > StringArray
A std::vector of std::strings.
constexpr const char * tx(const char *p) noexcept
A briefer alternative to G::gettext_noop().
A configuration structure for GStore::FileDelivery.
Low-level file-system operations for GStore::FileStore.