00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef MAILTRANSPORT_MESSAGEQUEUEJOB_H
00021 #define MAILTRANSPORT_MESSAGEQUEUEJOB_H
00022
00023 #include <mailtransport/mailtransport_export.h>
00024
00025 #include "dispatchmodeattribute.h"
00026 #include "sentactionattribute.h"
00027 #include "sentbehaviourattribute.h"
00028 #include "transportattribute.h"
00029
00030 #include <QtCore/QDateTime>
00031 #include <QtCore/QString>
00032 #include <QtCore/QStringList>
00033
00034 #include <KDE/KCompositeJob>
00035
00036 #include <akonadi/collection.h>
00037 #include <akonadi/kmime/addressattribute.h>
00038
00039 #include <kmime/kmime_message.h>
00040 #include <boost/shared_ptr.hpp>
00041
00042 namespace MailTransport {
00043
00086 class MAILTRANSPORT_EXPORT MessageQueueJob : public KCompositeJob
00087 {
00088 Q_OBJECT
00089
00090 public:
00095 explicit MessageQueueJob( QObject *parent = 0 );
00096
00101 virtual ~MessageQueueJob();
00102
00106 KMime::Message::Ptr message() const;
00107
00112 DispatchModeAttribute &dispatchModeAttribute();
00113
00119 Akonadi::AddressAttribute &addressAttribute();
00120
00126 TransportAttribute &transportAttribute();
00127
00132 SentBehaviourAttribute &sentBehaviourAttribute();
00133
00138 SentActionAttribute &sentActionAttribute();
00139
00143 void setMessage( KMime::Message::Ptr message );
00144
00149 virtual void start();
00150
00151 protected Q_SLOTS:
00157 virtual void slotResult( KJob * );
00158
00159 private:
00160 class Private;
00161 friend class Private;
00162 Private *const d;
00163
00164 Q_PRIVATE_SLOT( d, void outboxRequestResult( KJob* ) )
00165
00166 };
00167
00168 }
00169
00170 #endif // MAILTRANSPORT_MESSAGEQUEUEJOB_H