1/*
2 Copyright (c) 2009 Constantin Berzan <exit3219@gmail.com>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#ifndef MAILTRANSPORT_RESOURCESENDJOB_P_H
21#define MAILTRANSPORT_RESOURCESENDJOB_P_H
22
23#include <mailtransport/transportjob.h>
24
25#include <akonadi/item.h>
26
27namespace MailTransport {
28
29class ResourceSendJobPrivate;
30
31/**
32 Mail transport job for an Akonadi resource-based transport.
33
34 This is a wrapper job that makes old applications work with resource-based
35 transports. It calls the appropriate methods in MessageQueueJob, and emits
36 result() as soon as the item is placed in the outbox, since there is no way
37 of monitoring the progress from here.
38
39 @deprecated Use MessageQueueJob for placing messages in the outbox.
40
41 @author Constantin Berzan <exit3219@gmail.com>
42 @since 4.4
43*/
44class MAILTRANSPORT_DEPRECATED ResourceSendJob : public TransportJob
45{
46 Q_OBJECT
47 public:
48 /**
49 Creates an ResourceSendJob.
50 @param transport The transport object to use.
51 @param parent The parent object.
52 */
53 explicit ResourceSendJob( Transport *transport, QObject *parent = 0 );
54
55 /**
56 Destroys this job.
57 */
58 virtual ~ResourceSendJob();
59
60 protected:
61 /** reimpl */
62 virtual void doStart();
63
64 private:
65 friend class ResourceSendJobPrivate;
66 ResourceSendJobPrivate *const d;
67
68 Q_PRIVATE_SLOT( d, void slotEmitResult() )
69
70};
71
72} // namespace MailTransport
73
74#endif // MAILTRANSPORT_RESOURCESENDJOB_H
75