Libksieve

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

KDE's Doxygen guidelines are available online.