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 Folder folder.h <Attica/Folder>
21 *
22 * Represents a single mail folder
23 */
24class ATTICA_EXPORT Folder
25{
26public:
27 typedef QList<Folder> List;
28 class Parser;
29
30 /**
31 * Creates an empty Folder
32 */
33 Folder();
34
35 /**
36 * Copy constructor.
37 * @param other the Folder to copy from
38 */
39 Folder(const Folder &other);
40
41 /**
42 * Assignment operator.
43 * @param other the Folder to assign from
44 * @return pointer to this Folder
45 */
46 Folder &operator=(const Folder &other);
47
48 /**
49 * Destructor.
50 */
51 ~Folder();
52
53 /**
54 * Sets the id of the Folder.
55 * The id uniquely identifies a Folder with the OCS API.
56 * @param id the new id
57 */
58 void setId(const QString &id);
59
60 /**
61 * Gets the id of the Folder.
62 * The id uniquely identifies a Folder with the OCS API.
63 * @return the id
64 */
65 QString id() const;
66
67 /**
68 * Sets the name of the Folder.
69 * @param name the new name
70 */
71 void setName(const QString &name);
72
73 /**
74 * Gets the name of the Folder.
75 * @return the name
76 */
77 QString name() const;
78
79 /**
80 * Sets the number of messages in the Folder.
81 * @param messageCount the new number of messages
82 */
83 void setMessageCount(int messageCount);
84
85 /**
86 * Gets the number of messages in the Folder.
87 * @return the number of messages
88 */
89 int messageCount() const;
90
91 /**
92 * Sets the type of the folder
93 * @param type the new type
94 */
95 void setType(const QString &type);
96
97 /**
98 * Gets the type of the Folder.
99 * @return the type
100 */
101 QString type() const;
102
103 /**
104 * Checks whether this Folder has an id
105 * @return @c true if an id has been set, @c false otherwise
106 */
107 bool isValid() const;
108
109private:
110 class Private;
111 QSharedDataPointer<Private> d;
112};
113
114}
115
116#endif
117

source code of attica/src/folder.h