|
E-MailRelay
|
Represents an exclusive lock on the message store. More...
#include <gpopstore.h>
Public Types | |
| typedef StoreLockEntry::Size | Size |
| typedef StoreLockEntry | Entry |
| typedef std::list< Entry > | List |
| typedef void(* | Fn) (std::ostream &, const std::string &) |
Public Member Functions | |
| StoreLock (Store &store) | |
| Constructor. More... | |
| void | lock (const std::string &user) |
| Initialisation. More... | |
| bool | locked () const |
| Returns true if locked. | |
| ~StoreLock () | |
| Destructor. | |
| Size | messageCount () const |
| Returns the store's message count. | |
| Size | totalByteCount () const |
| Returns the store's total byte count. | |
| Size | byteCount (int id) const |
| Returns a message size. | |
| std::string | uidl (int id) const |
| Returns a message's unique id. | |
| bool | valid (int id) const |
| Validates a message number. | |
| List | list (int id=-1) const |
| Lists messages in the store. | |
| unique_ptr< std::istream > | get (int id) const |
| Retrieves the message content. | |
| void | remove (int) |
| Marks the message for removal. | |
| void | rollback () |
| Rolls back remove()als but retains the lock. More... | |
| void | commit () |
| Commits remove()als. More... | |
Represents an exclusive lock on the message store.
Definition at line 98 of file gpopstore.h.
|
explicit |
Constructor.
Keeps the reference.
Postcondition: !locked()
Definition at line 178 of file gpopstore.cpp.
| void GPop::StoreLock::commit | ( | ) |
| void GPop::StoreLock::lock | ( | const std::string & | user | ) |
Initialisation.
Precondition: !user.empty() && !locked() Postcondition: locked()
Definition at line 183 of file gpopstore.cpp.
| void GPop::StoreLock::rollback | ( | ) |
Rolls back remove()als but retains the lock.
Precondition: locked() Postcondition: locked() [sic]
Definition at line 437 of file gpopstore.cpp.
1.8.9.1