File indexing completed on 2024-05-19 05:16:10
0001 /* 0002 SPDX-FileCopyrightText: 2009 Constantin Berzan <exit3219@gmail.com> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include <MailTransport/TransportJob> 0010 0011 #include <Akonadi/Item> 0012 0013 namespace MailTransport 0014 { 0015 /** 0016 Mail transport job for an Akonadi resource-based transport. 0017 0018 This is a wrapper job that makes old applications work with resource-based 0019 transports. It calls the appropriate methods in MessageQueueJob, and emits 0020 result() as soon as the item is placed in the outbox, since there is no way 0021 of monitoring the progress from here. 0022 0023 @author Constantin Berzan <exit3219@gmail.com> 0024 @since 4.4 0025 */ 0026 class ResourceSendJob : public TransportJob 0027 { 0028 Q_OBJECT 0029 public: 0030 /** 0031 Creates an ResourceSendJob. 0032 @param transport The transport object to use. 0033 @param parent The parent object. 0034 */ 0035 explicit ResourceSendJob(Transport *transport, QObject *parent = nullptr); 0036 0037 /** 0038 Destroys this job. 0039 */ 0040 ~ResourceSendJob() override; 0041 0042 protected: 0043 void doStart() override; 0044 0045 private: 0046 void slotEmitResult(); 0047 }; 0048 } // namespace MailTransport