E-MailRelay

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Classes | Public Types | Public Member Functions | List of all members
GPop::StoreLock Class Reference

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...

## Detailed Description

Represents an exclusive lock on the message store.

See also
  RFC-1939

Definition at line 98 of file gpopstore.h.

## Constructor & Destructor Documentation

GPop::StoreLock::StoreLock | ( | Store & | store | ) |
| explicit

Constructor.

Keeps the reference.

Postcondition: !locked()

Definition at line 178 of file gpopstore.cpp.

## Member Function Documentation

void GPop::StoreLock::commit | ( |  | ) |

Commits remove()als.

Postcondition: !locked()

Definition at line 333 of file gpopstore.cpp.

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.

The documentation for this class was generated from the following files:

- /tmp/slackrepo/SBo/slackrepo.S3SYfd/build_emailrelay/emailrelay-2.0.1/src/gpop/gpopstore.h
- /tmp/slackrepo/SBo/slackrepo.S3SYfd/build_emailrelay/emailrelay-2.0.1/src/gpop/gpopstore.cpp