Libksieve

sieveimapinstanceinterfacemanager.cpp
1/*
2 SPDX-FileCopyrightText: 2017-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#include "sieveimapinstanceinterfacemanager.h"
8#include "libksievecore_debug.h"
9#include <KSieveCore/SieveImapInstance>
10#include <KSieveCore/SieveImapInstanceInterface>
11
12using namespace KSieveCore;
13
14SieveImapInstanceInterfaceManager::SieveImapInstanceInterfaceManager(QObject *parent)
15 : QObject(parent)
16{
17}
18
19SieveImapInstanceInterfaceManager::~SieveImapInstanceInterfaceManager()
20{
21 delete mInterface;
22}
23
24SieveImapInstanceInterfaceManager *SieveImapInstanceInterfaceManager::self()
25{
27 return &s_self;
28}
29
30void SieveImapInstanceInterfaceManager::setSieveImapInstanceInterface(SieveImapInstanceInterface *interface)
31{
32 mInterface = interface;
33}
34
35SieveImapInstanceInterface *SieveImapInstanceInterfaceManager::sieveImapInstanceInterface() const
36{
37 return mInterface;
38}
39
40QList<KSieveCore::SieveImapInstance> SieveImapInstanceInterfaceManager::sieveImapInstanceList() const
41{
42 if (mInterface) {
43 return mInterface->sieveImapInstances();
44 } else {
45 qCWarning(LIBKSIEVECORE_LOG) << " mInterface not defined";
46 return {};
47 }
48}
49
50#include "moc_sieveimapinstanceinterfacemanager.cpp"
The SieveImapInstanceInterface class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:09:39 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.