22 #ifndef AKONADI_MAILCLIENT_P_H
23 #define AKONADI_MAILCLIENT_P_H
25 #include "akonadi-calendar_export.h"
26 #include <kcalcore/incidencebase.h>
27 #include <kmime/kmime_message.h>
30 struct UnitTestResult {
31 typedef QList<UnitTestResult> List;
37 KMime::Message::Ptr message;
38 UnitTestResult() : transportId(-1) {}
41 namespace KPIMIdentities {
49 #ifdef PLEASE_TEST_INVITATIONS
50 #define EXPORT_MAILCLIENT AKONADI_CALENDAR_EXPORT
52 #define EXPORT_MAILCLIENT
55 class EXPORT_MAILCLIENT MailClient :
public QObject
64 ResultReallyNoAttendees,
65 ResultErrorCreatingTransport,
66 ResultErrorFetchingTransport,
70 explicit MailClient(QObject *parent = 0);
73 void mailAttendees(
const KCalCore::IncidenceBase::Ptr &,
74 const KPIMIdentities::Identity &identity,
75 bool bccMe,
const QString &attachment=QString(),
76 const QString &mailTransport = QString());
78 void mailOrganizer(
const KCalCore::IncidenceBase::Ptr &,
79 const KPIMIdentities::Identity &identity,
80 const QString &from,
bool bccMe,
81 const QString &attachment=QString(),
82 const QString &sub=QString(),
83 const QString &mailTransport = QString());
85 void mailTo(
const KCalCore::IncidenceBase::Ptr &,
const KPIMIdentities::Identity &identity,
86 const QString &from,
bool bccMe,
const QString &recipients,
87 const QString &attachment=QString(),
const QString &mailTransport = QString());
106 void send(
const KPIMIdentities::Identity &identity,
const QString &from,
const QString &to,
107 const QString &cc,
const QString &subject,
const QString &body,
108 bool hidden=
false,
bool bccMe=
false,
const QString &attachment=QString(),
109 const QString &mailTransport = QString());
112 void handleQueueJobFinished(KJob* job);
115 void finished(Akonadi::MailClient::Result result,
const QString &errorString);
119 static UnitTestResult::List sUnitTestResults;
120 static bool sRunningUnitTests;
125 Q_DECLARE_METATYPE(Akonadi::MailClient::Result)