1/*
2 This file is part of KDE.
3
4 SPDX-FileCopyrightText: 2008 Cornelius Schumacher <schumacher@kde.org>
5
6 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7*/
8
9#ifndef ATTICA_FOLDER_H
10#define ATTICA_FOLDER_H
11
12#include "attica_export.h"
13#include <QList>
14#include <QSharedDataPointer>
15#include <QString>
16
17namespace Attica
18{
19/*!
20 * \class Attica::Folder
21 * \inheaderfile Attica/Folder
22 * \inmodule Attica
23 *
24 * \brief Represents a single mail folder.
25 */
26class ATTICA_EXPORT Folder
27{
28public:
29 /*!
30 *
31 */
32 typedef QList<Folder> List;
33 class Parser;
34
35 /*!
36 * Creates an empty Folder
37 */
38 Folder();
39
40 Folder(const Folder &other);
41
42 Folder &operator=(const Folder &other);
43
44 ~Folder();
45
46 /*!
47 * Sets the id of the Folder.
48 *
49 * The id uniquely identifies a Folder with the OCS API.
50 *
51 * \a id the new id
52 */
53 void setId(const QString &id);
54
55 /*!
56 * Returns the id of the Folder.
57 *
58 * The id uniquely identifies a Folder with the OCS API.
59 */
60 QString id() const;
61
62 /*!
63 * Sets the name of the Folder.
64 *
65 * \a name the new name
66 */
67 void setName(const QString &name);
68
69 /*!
70 * Returns the name of the Folder.
71 */
72 QString name() const;
73
74 /*!
75 * Sets the number of messages in the Folder.
76 *
77 * \a messageCount the new number of messages
78 */
79 void setMessageCount(int messageCount);
80
81 /*!
82 * Returns the number of messages in the Folder.
83 */
84 int messageCount() const;
85
86 /*!
87 * Sets the type of the folder
88 *
89 * \a type the new type
90 */
91 void setType(const QString &type);
92
93 /*!
94 * Returns the type of the Folder.
95 */
96 QString type() const;
97
98 /*!
99 * Checks whether this Folder has an id
100 */
101 bool isValid() const;
102
103private:
104 class Private;
105 QSharedDataPointer<Private> d;
106};
107
108}
109
110#endif
111

source code of attica/src/folder.h