Akonadi Mime

messagefolderattribute.h
1/*
2 SPDX-FileCopyrightText: 2009 Kevin Ottens <ervin@kde.org>
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 <Akonadi/Attribute>
12
13#include <QByteArray>
14
15#include <memory>
16
17namespace Akonadi
18{
19class MessageFolderAttributePrivate;
20
21/**
22 Message folder information. Used eg. by mail clients to decide how to display the content of such collections
23 @since 4.4
24*/
25class AKONADI_MIME_EXPORT MessageFolderAttribute : public Attribute
26{
27public:
28 /**
29 Creates an empty folder attribute.
30 */
32
33 /**
34 Copy constructor.
35 */
37
38 /**
39 Destructor.
40 */
42
43 /**
44 Indicates if the folder is supposed to contain mostly outbound messages.
45 In such a case mail clients display the recipient address, otherwise they
46 display the sender address.
47
48 @return true if the folder contains outbound messages
49 */
50 [[nodiscard]] bool isOutboundFolder() const;
51
52 /**
53 Set if the folder should be considered as containing mostly outbound messages.
54 */
55 void setOutboundFolder(bool outbound);
56
57 // reimpl.
58 [[nodiscard]] QByteArray type() const override;
59 MessageFolderAttribute *clone() const override;
60 [[nodiscard]] QByteArray serialized() const override;
61 void deserialize(const QByteArray &data) override;
62
63private:
64 std::unique_ptr<MessageFolderAttributePrivate> const d;
65};
66}
~MessageFolderAttribute() override
Destructor.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:19:28 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.