Akonadi::TransportResourceBase

Search for usage in LXR

Akonadi::TransportResourceBase Class Referenceabstract

#include <transportresourcebase.h>

Public Types

enum  TransportResult { TransportSucceeded , TransportFailed }
 

Public Member Functions

 TransportResourceBase ()
 
virtual ~TransportResourceBase ()
 
void itemSent (const Akonadi::Item &item, TransportResult result, const QString &message=QString())
 
virtual void sendItem (const Akonadi::Item &item)=0
 

Detailed Description

Resource implementing mail transport capability.

This class allows a resource to provide mail transport (i.e. sending mail). A resource than can provide mail transport inherits from both ResourceBase and TransportResourceBase, implements the virtual method sendItem(), and calls itemSent() when finished sending.

The resource must also have the "MailTransport" capability flag. For example the desktop file may contain:

Helper integration between Akonadi and Qt.

For an example of a transport-enabled resource, see kdepim/runtime/resources/mailtransport_dummy

Author
Constantin Berzan exit3.nosp@m.219@.nosp@m.gmail.nosp@m..com
Since
4.4

Definition at line 41 of file transportresourcebase.h.

Member Enumeration Documentation

◆ TransportResult

Describes the result of the transport process.

Enumerator
TransportSucceeded 

The transport process succeeded.

TransportFailed 

The transport process failed.

Definition at line 57 of file transportresourcebase.h.

Constructor & Destructor Documentation

◆ TransportResourceBase()

TransportResourceBase::TransportResourceBase ( )

Creates a new transport resource base.

Definition at line 50 of file transportresourcebase.cpp.

◆ ~TransportResourceBase()

TransportResourceBase::~TransportResourceBase ( )
virtualdefault

Destroys the transport resource base.

Member Function Documentation

◆ itemSent()

void TransportResourceBase::itemSent ( const Akonadi::Item & item,
TransportResult result,
const QString & message = QString() )

This method marks the sending of the passed item as finished.

Parameters
itemThe item that was sent.
resultThe result that indicates whether the sending was successful or not.
messageAn optional text explanation of the result.
See also
Transport.

Definition at line 57 of file transportresourcebase.cpp.

◆ sendItem()

virtual void Akonadi::TransportResourceBase::sendItem ( const Akonadi::Item & item)
pure virtual

This method is called when the given item shall be send.

When the sending is done or an error occurred during sending, call itemSent() with the appropriate result flag.

Parameters
itemThe message item to be send.
See also
itemSent().

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

KDE's Doxygen guidelines are available online.