Libksieve

response.h
1 /*
2  SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]>
3  SPDX-FileContributor: Volker Krause <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7 
8 #pragma once
9 
10 #include <QByteArray>
11 
12 namespace KManageSieve
13 {
14 /** A response from a managesieve server.
15  * @internal
16  */
17 class Response
18 {
19 public:
20  enum Type { None, KeyValuePair, Action, Quantity };
21 
22  Response()
23  {
24  }
25 
26  Type type() const;
27  QByteArray action() const;
28  uint quantity() const;
29  QByteArray key() const;
30  QByteArray value() const;
31  QByteArray extra() const;
32 
33  enum Result { Ok, No, Bye, Other };
34 
35  Result operationResult() const;
36  bool operationSuccessful() const;
37 
38  void clear();
39  bool parseResponse(const QByteArray &line);
40 
41 private:
42  Type m_type = None;
43  uint m_quantity = 0;
44  QByteArray m_key;
45  QByteArray m_value;
46  QByteArray m_extra;
47 };
48 }
49 
A response from a managesieve server.
Definition: response.h:17
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Jun 22 2021 23:09:24 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.