2 Copyright (c) 2013-2015 Montel Laurent <montel@kde.org>
4 This program is free software; you can redistribute it and/or modify it
5 under the terms of the GNU General Public License, version 2, as
6 published by the Free Software Foundation.
8 This program is distributed in the hope that it will be useful, but
9 WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 General Public License for more details.
13 You should have received a copy of the GNU General Public License along
14 with this program; if not, write to the Free Software Foundation, Inc.,
15 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 #ifndef SENDLATERUTIL_H
19 #define SENDLATERUTIL_H
21 #include "sendlater_export.h"
22 #include <KSharedConfig>
27 namespace SendLaterUtil
29 SENDLATER_EXPORT
bool compareSendLaterInfo(SendLater::SendLaterInfo
*left
, SendLater::SendLaterInfo
*right
);
31 SENDLATER_EXPORT
KSharedConfig::Ptr
defaultConfig();
33 SENDLATER_EXPORT
void writeSendLaterInfo(KSharedConfig::Ptr config
, SendLater::SendLaterInfo
*info
, bool forceReload
= true);
35 SENDLATER_EXPORT
bool sentLaterAgentWasRegistered();
37 SENDLATER_EXPORT
bool sentLaterAgentEnabled();
39 SENDLATER_EXPORT
void reload();
41 SENDLATER_EXPORT
void changeRecurrentDate(SendLater::SendLaterInfo
*info
);
42 SENDLATER_EXPORT
void forceReparseConfiguration();
44 static QString sendLaterPattern
= QStringLiteral("SendLaterItem %1");
45 QDateTime
updateRecurence(SendLater::SendLaterInfo
*info
, QDateTime dateTime
);
48 #endif // SENDLATERUTIL_H