MessageCore::MailingList Class
class MessageCore::MailingListA class to extract information about mailing lists from emails. More...
| Header: | #include <MessageCore/MailingList> |
| CMake: | find_package(KPim6MessageCore REQUIRED)target_link_libraries(mytarget PRIVATE KPim6::MessageCore) |
Public Types
| enum | Feature { None, Post, Subscribe, Unsubscribe, Help, …, ArchivedAt } |
| flags | Features |
| enum | Handler { KMail, Browser } |
Public Functions
| MailingList() | |
| MailingList(const MessageCore::MailingList &other) | |
| ~MailingList() | |
| QList<QUrl> | archiveUrls() const |
| QList<QUrl> | archivedAtUrls() const |
| MessageCore::MailingList::Features | features() const |
| MessageCore::MailingList::Handler | handler() const |
| QList<QUrl> | helpUrls() const |
| QString | id() const |
| QList<QUrl> | ownerUrls() const |
| QList<QUrl> | postUrls() const |
| void | readConfig(const KConfigGroup &group) |
| void | setArchiveUrls(const QList<QUrl> &urls) |
| void | setArchivedAtUrls(const QList<QUrl> &url) |
| void | setHandler(MessageCore::MailingList::Handler handler) |
| void | setHelpUrls(const QList<QUrl> &urls) |
| void | setId(const QString &id) |
| void | setOwnerUrls(const QList<QUrl> &urls) |
| void | setPostUrls(const QList<QUrl> &urls) |
| void | setSubscribeUrls(const QList<QUrl> &urls) |
| void | setUnsubscribeUrls(const QList<QUrl> &urls) |
| QList<QUrl> | subscribeUrls() const |
| QList<QUrl> | unsubscribeUrls() const |
| void | writeConfig(KConfigGroup &group) const |
| MessageCore::MailingList & | operator=(const MessageCore::MailingList &other) |
Static Public Members
| MessageCore::MailingList | detect(const std::shared_ptr<KMime::Message> &message) |
Detailed Description
The mailing list header fields are defined as the following: - "List-*" in RFC2369 - "List-ID" in RFC2919. - "Archive-At" in RFC5064
Author: Zack Rusin <zack@kde.org>
Member Type Documentation
enum MailingList::Feature
flags MailingList::Features
Defines the features a mailinglist can support.
The Features type is a typedef for QFlags<Feature>. It stores an OR combination of Feature values.
enum MailingList::Handler
Defines what entity should manage the mailing list.
Member Function Documentation
MailingList::MailingList()
Creates an empty mailing list.
MailingList::MailingList(const MessageCore::MailingList &other)
Creates a mailing list from an other mailing list.
[noexcept] MailingList::~MailingList()
Destroys the mailing list.
QList<QUrl> MailingList::archiveUrls() const
Returns the list of List-Archive urls.
See also setArchiveUrls().
QList<QUrl> MailingList::archivedAtUrls() const
Returns the Archived-At url.
See also setArchivedAtUrls().
[static] MessageCore::MailingList MailingList::detect(const std::shared_ptr<KMime::Message> &message)
Extracts the information about a mailing list from the given message.
MessageCore::MailingList::Features MailingList::features() const
Returns the features the mailing list supports.
MessageCore::MailingList::Handler MailingList::handler() const
Returns the handler for the mailing list.
See also setHandler().
QList<QUrl> MailingList::helpUrls() const
Returns the list of List-Help urls.
See also setHelpUrls().
QString MailingList::id() const
Returns the id of the mailing list.
See also setId().
QList<QUrl> MailingList::ownerUrls() const
Returns the list of List-Owner urls.
See also setOwnerUrls().
QList<QUrl> MailingList::postUrls() const
Returns the list of List-Post urls.
See also setPostUrls().
void MailingList::readConfig(const KConfigGroup &group)
Restores the configuration for the mailing list from the config group.
void MailingList::setArchiveUrls(const QList<QUrl> &urls)
Sets the list of List-Archive urls.
See also archiveUrls().
void MailingList::setArchivedAtUrls(const QList<QUrl> &url)
Sets the Archived-At url.
See also archivedAtUrls().
void MailingList::setHandler(MessageCore::MailingList::Handler handler)
Sets the handler for the mailing list.
See also handler().
void MailingList::setHelpUrls(const QList<QUrl> &urls)
Sets the list of List-Help urls.
See also helpUrls().
void MailingList::setId(const QString &id)
Sets the id of the mailing list.
See also id().
void MailingList::setOwnerUrls(const QList<QUrl> &urls)
Sets the list of List-Owner urls.
See also ownerUrls().
void MailingList::setPostUrls(const QList<QUrl> &urls)
Sets the list of List-Post urls.
See also postUrls().
void MailingList::setSubscribeUrls(const QList<QUrl> &urls)
Sets the list of List-Subscribe urls.
See also subscribeUrls().
void MailingList::setUnsubscribeUrls(const QList<QUrl> &urls)
Sets the list of List-Unsubscribe urls.
See also unsubscribeUrls().
QList<QUrl> MailingList::subscribeUrls() const
Returns the list of List-Subscribe urls.
See also setSubscribeUrls().
QList<QUrl> MailingList::unsubscribeUrls() const
Returns the list of List-Unsubscribe urls.
See also setUnsubscribeUrls().
void MailingList::writeConfig(KConfigGroup &group) const
Saves the configuration for the mailing list to the config group.
MessageCore::MailingList &MailingList::operator=(const MessageCore::MailingList &other)
Overwrites this mailing list with an other mailing list.