21 #ifndef G_SMTP_MESSAGE_STORE_H
22 #define G_SMTP_MESSAGE_STORE_H
49 G_EXCEPTION( StorageError ,
"error storing message" ) ;
55 public:
virtual std::auto_ptr<GSmtp::StoredMessage>
next() = 0 ;
69 public: std::auto_ptr<StoredMessage>
next() ;
82 virtual std::auto_ptr<NewMessage>
newMessage(
const std::string & from ) = 0 ;
85 virtual bool empty()
const = 0 ;
88 virtual std::auto_ptr<StoredMessage>
get(
unsigned long id ) = 0 ;
115 virtual void repoll() = 0 ;
unsigned long m_ref_count
SMTP and message-store classes.
virtual std::auto_ptr< GSmtp::StoredMessage > next()=0
virtual void updated()=0
Called by associated classes to indicate that the store has changed.
virtual bool empty() const =0
Returns true if the message store is empty.
virtual Iterator failures()=0
Returns an iterator for failed messages.
virtual void unfailAll()=0
Causes messages marked as failed to be unmarked.
A base class for MessageStore::Iterator implementations.
std::auto_ptr< StoredMessage > next()
A class which allows SMTP messages (envelope+content) to be stored and retrieved. ...
static G::Path defaultDirectory()
Returns a default spool directory, such as "/usr/local/var/spool/emailrelay".
virtual ~MessageStore()
Destructor.
virtual G::Signal1< bool > & signal()=0
Provides a signal which is activated when something might have changed in the store.
virtual void repoll()=0
Ensures that the next updated() signal() has its parameter set to true.
Iterator & operator=(const Iterator &)
virtual std::auto_ptr< NewMessage > newMessage(const std::string &from)=0
Creates a new message.
#define G_EXCEPTION(class_name, description)
define as a function rather than a type if optimising for size
A Path object represents a file system path.
virtual Iterator iterator(bool lock)=0
Returns an iterator for stored messages.
An iterator class for GSmtp::MessageStore.