Messagelib

sendlaterutil.cpp
1/*
2 SPDX-FileCopyrightText: 2013-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#include "sendlaterutil.h"
8#include "sendlaterinterface.h"
9#include "sendlaterutil_p.h"
10
11#include <Akonadi/ServerManager>
12
13#include <Akonadi/ServerManager>
14
15using namespace MessageComposer;
16
17QString SendLaterUtil::agentServiceName()
18{
20 return ServerManager::agentServiceName(ServerManager::Agent, QStringLiteral("akonadi_sendlater_agent"));
21}
22
23QString SendLaterUtil::dbusPath()
24{
25 return QStringLiteral("/SendLaterAgent");
26}
27
28bool SendLaterUtil::sentLaterAgentWasRegistered()
29{
30 return org::freedesktop::Akonadi::SendLaterAgent{agentServiceName(), dbusPath(), QDBusConnection::sessionBus()}.isValid();
31}
32
33bool SendLaterUtil::sentLaterAgentEnabled()
34{
35 org::freedesktop::Akonadi::SendLaterAgent iface{agentServiceName(), dbusPath(), QDBusConnection::sessionBus()};
36 return iface.isValid() && iface.enabledAgent();
37}
Simple interface that both EncryptJob and SignEncryptJob implement so the composer can extract some e...
QDBusConnection sessionBus()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:33:25 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.