• Skip to content
  • Skip to link menu
Brand

API Documentation

  1. KDE API Reference
  2. KDE PIM
  3. Akonadi
  • KDE Home
  • Contact Us

Quick Links

Skip menu "Akonadi"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • File List
  • Modules
  • Related Pages

Class Picker

About

PIM Storage Framework

Maintainer
Daniel Vrátil
Supported platforms
Linux
Community
IRC: #akonadi on Freenode
Mailing list: kde-pim
Use with CMake
find_package(KF5AkonadiCore)
target_link_libraries(yourapp KF5::AkonadiCore)
Use with QMake
QT += AkonadiCore 
Clone
git clone git://anongit.kde.org/akonadi.git
Browse source
Akonadi on cgit.kde.org

Akonadi

  • View on LXR
  • Akonadi
  • Server
  • Handler
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
Akonadi::Server::Handler Class Referenceabstract

#include <handler.h>

Inheritance diagram for Akonadi::Server::Handler:
Inheritance graph
[legend]

Public Member Functions

bool checkScopeConstraints (const Scope &scope, int permittedScopes)
 
Protocol::CommandPtr command () const
 
Connection * connection () const
 
bool failureResponse (const char *response)
 
bool failureResponse (const QByteArray &response)
 
bool failureResponse (const QString &response)
 
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)
 
DataStore * storageBackend () const
 
template<typename T >
bool successResponse ()
 
template<typename T >
bool successResponse (T &&response)
 
quint64 tag () const
 

Static Public Member Functions

static std::unique_ptr< Handler > findHandlerForCommandAlwaysAllowed (Protocol::Command::Type cmd)
 
static std::unique_ptr< Handler > findHandlerForCommandAuthenticated (Protocol::Command::Type cmd)
 
static std::unique_ptr< Handler > findHandlerForCommandNonAuthenticated (Protocol::Command::Type cmd)
 

Protected Attributes

Protocol::CommandPtr m_command
 

Detailed Description

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

Definition at line 47 of file handler.h.

Member Function Documentation

std::unique_ptr< Handler > Handler::findHandlerForCommandAlwaysAllowed ( Protocol::Command::Type  cmd)
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 69 of file handler.cpp.

std::unique_ptr< Handler > Handler::findHandlerForCommandAuthenticated ( Protocol::Command::Type  cmd)
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 78 of file handler.cpp.

std::unique_ptr< Handler > Handler::findHandlerForCommandNonAuthenticated ( Protocol::Command::Type  cmd)
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 59 of file handler.cpp.

virtual bool Akonadi::Server::Handler::parseStream ( )
pure virtual

Parse and handle the IMAP message using the streaming parser.

The implementation MUST leave the trailing newline character(s) in the stream!

Returns
true if parsed successfully, false in case of parse failure

Implemented in Akonadi::Server::ItemModifyHandler, Akonadi::Server::CollectionFetchHandler, Akonadi::Server::CollectionCopyHandler, Akonadi::Server::ItemCopyHandler, Akonadi::Server::ItemMoveHandler, Akonadi::Server::ItemCreateHandler, Akonadi::Server::ItemDeleteHandler, Akonadi::Server::CollectionDeleteHandler, Akonadi::Server::ResourceSelectHandler, Akonadi::Server::CollectionMoveHandler, Akonadi::Server::ItemLinkHandler, Akonadi::Server::SearchHandler, Akonadi::Server::CollectionModifyHandler, Akonadi::Server::ItemFetchHandler, Akonadi::Server::RelationFetchHandler, Akonadi::Server::SearchCreateHandler, Akonadi::Server::SearchResultHandler, Akonadi::Server::TagFetchHandler, Akonadi::Server::TransactionHandler, Akonadi::Server::CollectionStatsFetchHandler, Akonadi::Server::LoginHandler, and Akonadi::Server::LogoutHandler.

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 199 of file handler.cpp.

quint64 Handler::tag ( ) const

The tag of the command associated with this handler.

Definition at line 204 of file handler.cpp.


The documentation for this class was generated from the following files:
  • handler.h
  • handler.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2019 The KDE developers.
Generated on Mon Dec 9 2019 02:01:52 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal