File indexing completed on 2024-06-23 05:18:37
0001 /* 0002 SPDX-FileCopyrightText: 2020 Daniel Vrátil <dvratil@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include <KJob> 0010 #include <QDBusPendingReply> 0011 0012 #include "messagecomposer_export.h" 0013 0014 class OrgFreedesktopAkonadiSendLaterAgentInterface; 0015 0016 namespace MessageComposer 0017 { 0018 class MESSAGECOMPOSER_EXPORT SendLaterJob : public KJob 0019 { 0020 Q_OBJECT 0021 public: 0022 enum Error { 0023 AgentNotAvailable = KJob::UserDefinedError, 0024 CallFailed, 0025 }; 0026 0027 explicit SendLaterJob(QObject *parent = nullptr); 0028 0029 void start() final; 0030 0031 protected: 0032 virtual QDBusPendingReply<> doCall(OrgFreedesktopAkonadiSendLaterAgentInterface *iface) = 0; 0033 virtual QString getErrorString(Error error, const QString &desc) const = 0; 0034 }; 0035 }