File indexing completed on 2024-12-01 03:37:34
0001 /* 0002 This file is part of KDE. 0003 0004 SPDX-FileCopyrightText: 2008 Cornelius Schumacher <schumacher@kde.org> 0005 0006 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0007 */ 0008 0009 #ifndef ATTICA_FOLDER_H 0010 #define ATTICA_FOLDER_H 0011 0012 #include "attica_export.h" 0013 #include <QList> 0014 #include <QSharedDataPointer> 0015 #include <QString> 0016 0017 namespace Attica 0018 { 0019 /** 0020 * @class Folder folder.h <Attica/Folder> 0021 * 0022 * Represents a single mail folder 0023 */ 0024 class ATTICA_EXPORT Folder 0025 { 0026 public: 0027 typedef QList<Folder> List; 0028 class Parser; 0029 0030 /** 0031 * Creates an empty Folder 0032 */ 0033 Folder(); 0034 0035 /** 0036 * Copy constructor. 0037 * @param other the Folder to copy from 0038 */ 0039 Folder(const Folder &other); 0040 0041 /** 0042 * Assignment operator. 0043 * @param other the Folder to assign from 0044 * @return pointer to this Folder 0045 */ 0046 Folder &operator=(const Folder &other); 0047 0048 /** 0049 * Destructor. 0050 */ 0051 ~Folder(); 0052 0053 /** 0054 * Sets the id of the Folder. 0055 * The id uniquely identifies a Folder with the OCS API. 0056 * @param id the new id 0057 */ 0058 void setId(const QString &id); 0059 0060 /** 0061 * Gets the id of the Folder. 0062 * The id uniquely identifies a Folder with the OCS API. 0063 * @return the id 0064 */ 0065 QString id() const; 0066 0067 /** 0068 * Sets the name of the Folder. 0069 * @param name the new name 0070 */ 0071 void setName(const QString &name); 0072 0073 /** 0074 * Gets the name of the Folder. 0075 * @return the name 0076 */ 0077 QString name() const; 0078 0079 /** 0080 * Sets the number of messages in the Folder. 0081 * @param messageCount the new number of messages 0082 */ 0083 void setMessageCount(int messageCount); 0084 0085 /** 0086 * Gets the number of messages in the Folder. 0087 * @return the number of messages 0088 */ 0089 int messageCount() const; 0090 0091 /** 0092 * Sets the type of the folder 0093 * @param type the new type 0094 */ 0095 void setType(const QString &type); 0096 0097 /** 0098 * Gets the type of the Folder. 0099 * @return the type 0100 */ 0101 QString type() const; 0102 0103 /** 0104 * Checks whether this Folder has an id 0105 * @return @c true if an id has been set, @c false otherwise 0106 */ 0107 bool isValid() const; 0108 0109 private: 0110 class Private; 0111 QSharedDataPointer<Private> d; 0112 }; 0113 0114 } 0115 0116 #endif