Messagelib

sendlatercreatejob.cpp
1 /*
2  SPDX-FileCopyrightText: 2020 Daniel Vr├ítil <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #include "sendlatercreatejob.h"
8 #include "sendlaterinterface.h"
9 
10 #include <KLocalizedString>
11 
12 using namespace MessageComposer;
13 
14 SendLaterCreateJob::SendLaterCreateJob(const SendLaterInfo &info, QObject *parent)
15  : SendLaterJob(parent)
16  , mInfo(info)
17 {
18 }
19 
20 QDBusPendingReply<> SendLaterCreateJob::doCall(OrgFreedesktopAkonadiSendLaterAgentInterface *iface)
21 {
22  return iface->addItem(mInfo.dateTime().toSecsSinceEpoch(),
23  mInfo.isRecurrence(),
24  mInfo.recurrenceEachValue(),
25  mInfo.recurrenceUnit(),
26  mInfo.itemId(),
27  mInfo.subject(),
28  mInfo.to());
29 }
30 
31 QString SendLaterCreateJob::getErrorString(Error, const QString &detail) const
32 {
33  return i18n("Failed to schedule message for sending later: %1", detail);
34 }
Send later information.
Definition: sendlaterinfo.h:17
QString i18n(const char *text, const TYPE &arg...)
Simple interface that both EncryptJob and SignEncryptJob implement so the composer can extract some e...
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Nov 30 2021 23:05:48 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.