Class ManageSieve.

Inherits SaslConnection

This class implements a ManageSieve server.

The ManageSieve protocol is defined in draft-martin-managesieve-06.txt.

ManageSieve::ManageSieve( int s )

Creates a ManageSieve server for the fd s, and sends the initial banner.

void ManageSieve::addCommand()

Creates a new ManageSieveCommand based on the arguments received from the client.

void ManageSieve::capabilities()

Enqueues a suitably-formatted list of our capabilities.

void ManageSieve::no( const EString & s )

Sends s as a negative NO response.

void ManageSieve::ok( const EString & s )

Sends s as a positive OK response.

void ManageSieve::parse()

Parses ManageSieve client commands.

void ManageSieve::runCommands()

The ManageSieve server maintains a list of commands received from the client and processes them one at a time in the order they were received. This function executes the first command in the list, or if the first command has completed, removes it and executes the next one.

It should be called when a new command has been created (i.e., by ManageSieve::parse()) or when a running command finishes.

Because the managesieve specification forbids executing any commands sent after logout, runCommands() must take special care to avoid that.

void ManageSieve::send( const EString & s )

Sends the literal response s without adding a tag.

void ManageSieve::sendChallenge( const EString & s )

Enqueues the SASL challenge s on this connection.

This version of the function avoids sending challenges as quoted strings, to please the KDE. The KDE behaviour is a clear bug, but unlikely to be fixed in KDE 3.x, maybe it won't be fixed at all.

http://launchpad.net/bugs/228214

Reimplements SaslConnection::sendChallenge().

void ManageSieve::setReader( ManageSieveCommand * cmd )

Reserves the input stream for processing by cmd, which may be 0 to indicate that the input should be processed as usual. Used by AUTH to parse non-command input.

void ManageSieve::setReserved( bool r )

Reserves the input stream to inhibit parsing if r is true. If r is false, then the server processes input as usual. Used by STLS to inhibit parsing.

void ManageSieve::setState( State s )

Sets this server's state to s, which may be either Unauthorised or Authorised (as defined in ManageSieve::State).

State ManageSieve::state() const

Returns the server's current state.

Reimplements Connection::state().

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