Akonadi.TransportResourceBase

KDE 4.9 PyKDE API Reference

- KDE's Python API

# TransportResourceBase Class Reference

`from PyKDE4.akonadi import *`

Namespace: Akonadi

## 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:

    X-Akonadi-Capabilities=Resource,MailTransport

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

Author:
  Constantin Berzan <exit3219@gmail.com>

Since:
  4.4

## Enumerations
TransportResult | { TransportSucceeded, TransportFailed }
## Methods
| __init__ (self)
| itemSent (self, Akonadi.Item item, Akonadi.TransportResourceBase.TransportResult result, QString message=QString())
| sendItem (self, Akonadi.Item item)

## Method Documentation

__init__ | ( |  | self ) |

Creates a new transport resource base.

itemSent | ( | self, |
|  | Akonadi.Item | item,
|  | Akonadi.TransportResourceBase.TransportResult | result,
|  | 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 successful or not.
  | message | An optional text explanation of the result.

See also:
  Transport.

sendItem | ( | self, |
|  | Akonadi.Item | item
| ) |  |  |

Abstract method:
  This method is abstract and can be overridden but not called directly.

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:

  | item | The message item to be send.

See also:
  itemSent().

## Enumeration Documentation

TransportResult

Describes the result of the transport process.

Enumerator:

  TransportSucceeded |
  TransportFailed |