akonadi
Akonadi::TransportResourceBase Class Reference
Resource implementing mail transport capability. More...
#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.
To implement a transport-enabled resource, inherit from both ResourceBase and TransportResourceBase, implement the virtual method sendItem(), and call emitTransportResult() when finished sending. The resource must also have the "MailTransport" capability flag.
For an example of a transport-enabled resource, see kdepim/akonadi/resources/mailtransport_dummy.
- Since:
- 4.4
Definition at line 49 of file transportresourcebase.h.
Member Enumeration Documentation
Describes the result of the transport process.
- Enumerator:
TransportSucceeded The transport process succeeded.
TransportFailed The transport process failed.
Definition at line 65 of file transportresourcebase.h.
Constructor & Destructor Documentation
TransportResourceBase::TransportResourceBase | ( | ) |
Creates a new transport resource base.
Definition at line 63 of file transportresourcebase.cpp.
TransportResourceBase::~TransportResourceBase | ( | ) | [virtual] |
Destroys the transport resource base.
Definition at line 68 of file transportresourcebase.cpp.
Member Function Documentation
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:
-
item The item that was sent. result The result that indicates whether the sending was successfully or not. message An optional textual explanation of the result.
- See also:
- Transport.
Definition at line 73 of file transportresourcebase.cpp.
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 according result flag.
- Parameters:
-
item The message item to be send.
- See also:
- itemSent().
The documentation for this class was generated from the following files: