Libksieve

sieveimapinstance.h
1/*
2 SPDX-FileCopyrightText: 2017-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "ksievecore_export.h"
10#include <QObject>
11
12namespace KSieveCore
13{
14/**
15 * @brief The SieveImapInstance class
16 * @author Laurent Montel <montel@kde.org>
17 */
18class KSIEVECORE_EXPORT SieveImapInstance
19{
20public:
22 ~SieveImapInstance() = default;
23
24 // Same enum
25 enum Status {
26 Idle = 0, ///< The agent instance does currently nothing.
27 Running, ///< The agent instance is working on something.
28 Broken, ///< The agent instance encountered an error state.
29 NotConfigured ///< The agent is lacking required configuration
30 };
31
32 [[nodiscard]] QString name() const;
33 void setName(const QString &name);
34
35 [[nodiscard]] QString identifier() const;
36 void setIdentifier(const QString &identifier);
37
38 [[nodiscard]] Status status() const;
39 void setStatus(Status status);
40
41 [[nodiscard]] QStringList mimeTypes() const;
42 void setMimeTypes(const QStringList &mimeTypes);
43
44 [[nodiscard]] QStringList capabilities() const;
45 void setCapabilities(const QStringList &capabilities);
46
47 [[nodiscard]] bool operator==(const SieveImapInstance &other) const;
48
49private:
50 QStringList mMimeTypes;
51 QStringList mCapabilities;
52 QString mName;
53 QString mIdentifier;
54 Status mStatus = Idle;
55};
56}
57Q_DECLARE_TYPEINFO(KSieveCore::SieveImapInstance, Q_RELOCATABLE_TYPE);
The SieveImapInstance class.
@ Broken
The agent instance encountered an error state.
@ Running
The agent instance is working on something.
Q_SCRIPTABLE CaptureState status()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:57:10 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.