Class SieveAction.

Inherits Garbage

The SieveAction class models a single sieve action as specified in RFC 5228 section 4, ie. something a SieveScript decides to do, and that the Sieve interpreter does after sieving a message.

SieveAction objects are created by SieveCommand objects while evaluating themselves in the context of a Message.

SieveAction::SieveAction( Type type )

Constructs a SieveAction of type. The constructed object is not immediately valid; depending on type you may have to call e.g. setMailbox().

bool SieveAction::done() const

Returns true if this action has finished its task, and false otherwise.

EString SieveAction::errorMessage() const

Returns what setErrorMessage() recorded, or an empty string if setErrorMessage() has not been called.

uint SieveAction::expiry() const

Returns whatever setExpiry() recorded, or 0 if setExpiry() hasn't been called.

bool SieveAction::failed() const

Returns true if this action has failed to accomplish its task, and false if it has succeeded or the possibility of success remains.

UString SieveAction::handle() const

Returns whatever setHandle() set, or an empty string if setHandle() hasn't been called.

Mailbox * SieveAction::mailbox() const

Returns the mailbox set by setMailbox(), or 0 if setMailbox() has not been called. This value is only meaningful if type() is FileInto.

Injectee * SieveAction::message() const

Returns whatever setMessage() recorded, or a null pointer if setMessage() hasn't been called.

Address * SieveAction::recipientAddress() const

Returns the address set by setRecipientAddress(), or 0 if setRecipientAddress() has not been called.

Address * SieveAction::senderAddress() const

Returns the address set by setSenderAddress(), or 0 if setSenderAddress() has not been called.

void SieveAction::setErrorMessage( const EString & m )

Records the error message m. Only useful if the action's type() is Error.

void SieveAction::setExpiry( uint n )

Records that this autoresponse should suppress similar autoresponses for n days. Similarity is defined by handle(), recipientAddress() and senderAddress().

void SieveAction::setHandle( const UString & h )

Records that the handle associated with this action is h. Only useful for the Vacation type().

void SieveAction::setMailbox( Mailbox * mailbox )

Records that this action's target is mailbox, provided that its type() is FileInto. If type() has any other value, calling setMailbox() sets an unused variable.

void SieveAction::setMessage( Injectee * m )

Records that m is associated with this action. Only useful when type() is Vacation.

void SieveAction::setRecipientAddress( Address * address )

Records that this action's recipient is address, provided that its type() is Redirect or Vacation. If type() has any other value, calling setRecipientAddress() sets an unused variable.

void SieveAction::setSenderAddress( Address * address )

Records that this action's sender target is address, provided that its type() is Redirect or Vacation. If type() has any other value, calling setSenderAddress() sets an unused variable.

Type SieveAction::type() const

Returns the action's type, as set by the constructor.

This web page based on source code belonging to The Archiveopteryx Developers. All rights reserved.