Akonadi Mime

errorattribute.h
1/*
2 SPDX-FileCopyrightText: 2009 Constantin Berzan <exit3219@gmail.com>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "akonadi-mime_export.h"
10
11#include <QString>
12
13#include <Akonadi/Attribute>
14
15#include <memory>
16
17namespace Akonadi
18{
19class ErrorAttributePrivate;
20
21/**
22 * @short An Attribute to mark messages that failed to be sent.
23 *
24 * This attribute contains the error message encountered.
25 *
26 * @author Constantin Berzan <exit3219@gmail.com>
27 * @since 4.4
28 */
29class AKONADI_MIME_EXPORT ErrorAttribute : public Akonadi::Attribute
30{
31public:
32 /**
33 * Creates a new error attribute.
34 *
35 * @param msg The i18n'ed error message.
36 */
37 explicit ErrorAttribute(const QString &msg = QString());
38
39 /**
40 * Destroys the error attribute.
41 */
42 ~ErrorAttribute() override;
43
44 /**
45 * Returns the i18n'ed error message.
46 */
47 [[nodiscard]] QString message() const;
48
49 /**
50 * Sets the i18n'ed error message.
51 */
52 void setMessage(const QString &msg);
53
54 /* reimpl */
55 ErrorAttribute *clone() const override;
56 [[nodiscard]] QByteArray type() const override;
57 [[nodiscard]] QByteArray serialized() const override;
58 void deserialize(const QByteArray &data) override;
59
60private:
61 //@cond PRIVATE
62 std::unique_ptr<ErrorAttributePrivate> const d;
63 //@endcond
64};
65}
An Attribute to mark messages that failed to be sent.
~ErrorAttribute() override
Destroys the error attribute.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:32:40 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.