Class SieveNotifyMethod.

Inherits Garbage

The SieveNotifyMethod class takes care of the Sieve-specific parts of notifying: Parsing an URL, adding in From etc., constructing the message.

It does not actually notify. That will be left for another class, to be implemented. I think that other class will also be fed by Log, perhaps indirectly.

SieveNotifyMethod::SieveNotifyMethod( const UString & url, SieveProduction * argument, SieveProduction * command )

Constructs a SieveNotifyMethod object to parse and generally check url.

Reports errors using argument if that is non-null, otherwise using command.

SieveProduction * SieveNotifyMethod::command() const

Returns the command argument to the constructor.

Reachability SieveNotifyMethod::reachability() const

Returns... hm, returns Unknown. We don't support any IM methods yet.

I think that when we do add support for XMPP, this may still return Unknown for XMPP, if we've started looking but not found the answer yet.

void SieveNotifyMethod::reportError( const EString & e, SieveProduction * p )

Reports the error e via p if supplied, otherwise via the command().

void SieveNotifyMethod::setFrom( Address * f )

Records that f should be used as the From address. Applies only if type() is Mailto.

void SieveNotifyMethod::setFrom( const UString & f, SieveProduction * a )

Parses f as an email address and records that it should be used as From, and that any errors should be recorded via a.

void SieveNotifyMethod::setMessage( const UString & m, SieveProduction * a )

Records that m should be sent as body text.

This may cause errors. If it does, then they'll be reported via a.

Type SieveNotifyMethod::type() const

Returns the notification type, as inferred using the URL at construction time.

bool SieveNotifyMethod::valid()

Returns true if this object is valid, and false if there's something bad. Also reports the error using command().

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