Akonadi::Server::Handler

#include <handler.h>

Inheritance diagram for Akonadi::Server::Handler:

Public Member Functions

 Handler (const Handler &)=delete
 
 Handler (Handler &&) noexcept=delete
 
AkonadiServer & akonadi () const
 
bool checkScopeConstraints (const Scope &scope, int permittedScopes)
 
Protocol::CommandPtr command () const
 
Connectionconnection () const
 
bool failureResponse (const char *response)
 
bool failureResponse (const QByteArray &response)
 
bool failureResponse (const QString &response)
 
Handleroperator= (const Handler &)=delete
 
Handleroperator= (Handler &&) noexcept=delete
 
virtual bool parseStream ()=0
 
template<typename T >
void sendResponse (T &&response)
 
template<typename T >
void sendResponse ()
 
void setCommand (const Protocol::CommandPtr &cmd)
 
void setConnection (Connection *connection)
 
void setTag (quint64 tag)
 
DataStorestorageBackend () const
 
template<typename T >
bool successResponse ()
 
template<typename T >
bool successResponse (T &&response)
 
quint64 tag () const
 

Static Public Member Functions

static std::unique_ptr< HandlerfindHandlerForCommandAlwaysAllowed (Protocol::Command::Type cmd, AkonadiServer &akonadi)
 
static std::unique_ptr< HandlerfindHandlerForCommandAuthenticated (Protocol::Command::Type cmd, AkonadiServer &akonadi)
 
static std::unique_ptr< HandlerfindHandlerForCommandNonAuthenticated (Protocol::Command::Type cmd, AkonadiServer &akonadi)
 

Protected Member Functions

 Handler (AkonadiServer &akonadi)
 

Protected Attributes

Protocol::CommandPtr m_command
 

Detailed Description

The handler interfaces describes an entity capable of handling an AkonadiIMAP command.

Definition at line 35 of file handler.h.

Member Function Documentation

std::unique_ptr< Handler > Handler::findHandlerForCommandAlwaysAllowed ( Protocol::Command::Type  cmd,
AkonadiServer &  akonadi 
)
static

Find a handler for a command that is always allowed, like LOGOUT.

Parameters
cmdthe command string
Returns
an instance to the handler. The handler is deleted after
See also
handelLine is executed. The caller needs to delete the handler in case an exception is thrown from handelLine.

Definition at line 54 of file handler.cpp.

std::unique_ptr< Handler > Handler::findHandlerForCommandAuthenticated ( Protocol::Command::Type  cmd,
AkonadiServer &  akonadi 
)
static

Find a handler for a command that is allowed when the client is authenticated, like LIST, FETCH, etc.

Parameters
cmdthe command string
Returns
an instance to the handler. The handler is deleted after
See also
handelLine is executed. The caller needs to delete the handler in case an exception is thrown from handelLine.

Definition at line 63 of file handler.cpp.

std::unique_ptr< Handler > Handler::findHandlerForCommandNonAuthenticated ( Protocol::Command::Type  cmd,
AkonadiServer &  akonadi 
)
static

Find a handler for a command that is allowed when the client is not yet authenticated, like LOGIN.

Parameters
cmdthe command string
Returns
an instance to the handler. The handler is deleted after
See also
handelLine is executed. The caller needs to delete the handler in case an exception is thrown from handelLine.

Definition at line 44 of file handler.cpp.

void Handler::setTag ( quint64  tag)

Set the tag of the command to be processed, and thus of the response generated by this handler.

Parameters
tagThe command tag, an alphanumerical string, normally.

Definition at line 187 of file handler.cpp.

quint64 Handler::tag ( ) const

The tag of the command associated with this handler.

Definition at line 192 of file handler.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Nov 30 2020 23:18:07 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.