Libksieve

sieveimapinstance.h
1 /*
2  SPDX-FileCopyrightText: 2017-2021 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "ksieveui_export.h"
10 #include <QObject>
11 
12 namespace KSieveUi
13 {
14 /**
15  * @brief The SieveImapInstance class
16  * @author Laurent Montel <[email protected]>
17  */
18 class KSIEVEUI_EXPORT SieveImapInstance
19 {
20 public:
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  Q_REQUIRED_RESULT QString name() const;
33  void setName(const QString &name);
34 
35  Q_REQUIRED_RESULT QString identifier() const;
36  void setIdentifier(const QString &identifier);
37 
38  Q_REQUIRED_RESULT Status status() const;
39  void setStatus(Status status);
40 
41  Q_REQUIRED_RESULT QStringList mimeTypes() const;
42  void setMimeTypes(const QStringList &mimeTypes);
43 
44  Q_REQUIRED_RESULT QStringList capabilities() const;
45  void setCapabilities(const QStringList &capabilities);
46 
47  Q_REQUIRED_RESULT bool operator==(const SieveImapInstance &other) const;
48 
49 private:
50  QStringList mMimeTypes;
51  QStringList mCapabilities;
52  QString mName;
53  QString mIdentifier;
54  Status mStatus = Idle;
55 };
56 }
57 Q_DECLARE_TYPEINFO(KSieveUi::SieveImapInstance, Q_MOVABLE_TYPE);
58 
The agent instance encountered an error state.
The SieveImapInstance class.
The agent instance is working on something.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Fri Apr 16 2021 23:09:34 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.