MessageCore::MailingList

#include <mailinglist.h>

Public Types

enum  Feature {
  None = 0 << 0, Post = 1 << 0, Subscribe = 1 << 1, Unsubscribe = 1 << 2,
  Help = 1 << 3, Archive = 1 << 4, Id = 1 << 5, Owner = 1 << 6,
  ArchivedAt = 1 << 7
}
 
typedef QFlags< FeatureFeatures
 
enum  Handler { KMail, Browser }
 

Public Member Functions

 MailingList ()
 
 MailingList (const MailingList &other)
 
 ~MailingList ()
 
QList< QUrlarchivedAtUrls () const
 
QList< QUrlarchiveUrls () const
 
Features features () const
 
Handler handler () const
 
QList< QUrlhelpUrls () const
 
QString id () const
 
MailingListoperator= (const MailingList &other)
 
bool operator== (const MailingList &other) const
 
QList< QUrlownerUrls () const
 
QList< QUrlpostUrls () const
 
void readConfig (const KConfigGroup &group)
 
void setArchivedAtUrls (const QList< QUrl > &url)
 
void setArchiveUrls (const QList< QUrl > &urls)
 
void setHandler (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< QUrlsubscribeUrls () const
 
QList< QUrlunsubscribeUrls () const
 
void writeConfig (KConfigGroup &group) const
 

Static Public Member Functions

static MailingList detect (const KMime::Message::Ptr &message)
 
static QString name (const KMime::Message::Ptr &message, QByteArray &headerName, QString &headerValue)
 

Detailed Description

A class to extract information about mailing lists from emails.

The mailing list header fields are defined as the following:

  • "List-*" in RFC2369
  • "List-ID" in RFC2919.
  • "Archive-At" in RFC5064
Author
Zack Rusin [email protected][email protected]kde.[email protected]org

Definition at line 31 of file mailinglist.h.

Member Enumeration Documentation

Defines the features a mailinglist can support.

Enumerator
None 

No mailing list fields exist.

Post 

List-Post header exists.

Subscribe 

List-Subscribe header exists.

Unsubscribe 

List-Unsubscribe header exists.

Help 

List-Help header exists.

Archive 

List-Archive header exists.

Id 

List-ID header exists.

Owner 

List-Owner header exists.

ArchivedAt 

Archive-At header exists.

Definition at line 45 of file mailinglist.h.

Defines what entity should manage the mailing list.

Enumerator
KMail 

The list is handled by KMail.

Browser 

The list is handled by a browser.

Definition at line 37 of file mailinglist.h.

Constructor & Destructor Documentation

MailingList::MailingList ( )

Creates an empty mailing list.

Definition at line 354 of file mailinglist.cpp.

MailingList::MailingList ( const MailingList other)

Creates a mailing list from an other mailing list.

Definition at line 359 of file mailinglist.cpp.

MailingList::~MailingList ( )

Destroys the mailing list.

Definition at line 387 of file mailinglist.cpp.

Member Function Documentation

QList< QUrl > MailingList::archivedAtUrls ( ) const

Returns the Archived-At url.

Definition at line 513 of file mailinglist.cpp.

QList< QUrl > MailingList::archiveUrls ( ) const

Returns the list of List-Archive urls.

Definition at line 481 of file mailinglist.cpp.

MailingList MailingList::detect ( const KMime::Message::Ptr message)
static

Extracts the information about a mailing list from the given message.

Definition at line 295 of file mailinglist.cpp.

MailingList::Features MailingList::features ( ) const

Returns the features the mailing list supports.

Definition at line 391 of file mailinglist.cpp.

MailingList::Handler MailingList::handler ( ) const

Returns the handler for the mailing list.

Definition at line 401 of file mailinglist.cpp.

QList< QUrl > MailingList::helpUrls ( ) const

Returns the list of List-Help urls.

Definition at line 465 of file mailinglist.cpp.

QString MailingList::id ( ) const

Returns the id of the mailing list.

Definition at line 529 of file mailinglist.cpp.

MailingList & MailingList::operator= ( const MailingList other)

Overwrites this mailing list with an other mailing list.

Definition at line 364 of file mailinglist.cpp.

QList< QUrl > MailingList::ownerUrls ( ) const

Returns the list of List-Owner urls.

Definition at line 497 of file mailinglist.cpp.

QList< QUrl > MailingList::postUrls ( ) const

Returns the list of List-Post urls.

Definition at line 417 of file mailinglist.cpp.

void MailingList::readConfig ( const KConfigGroup group)

Restores the configuration for the mailing list from the config group.

Definition at line 599 of file mailinglist.cpp.

void MailingList::setArchivedAtUrls ( const QList< QUrl > &  url)

Sets the Archived-At url.

Definition at line 502 of file mailinglist.cpp.

void MailingList::setArchiveUrls ( const QList< QUrl > &  urls)

Sets the list of List-Archive urls.

Definition at line 470 of file mailinglist.cpp.

void MailingList::setHandler ( MailingList::Handler  handler)

Sets the handler for the mailing list.

Definition at line 396 of file mailinglist.cpp.

void MailingList::setHelpUrls ( const QList< QUrl > &  urls)

Sets the list of List-Help urls.

Definition at line 454 of file mailinglist.cpp.

void MailingList::setId ( const QString id)

Sets the id of the mailing list.

Definition at line 518 of file mailinglist.cpp.

void MailingList::setOwnerUrls ( const QList< QUrl > &  urls)

Sets the list of List-Owner urls.

Definition at line 486 of file mailinglist.cpp.

void MailingList::setPostUrls ( const QList< QUrl > &  urls)

Sets the list of List-Post urls.

Definition at line 406 of file mailinglist.cpp.

void MailingList::setSubscribeUrls ( const QList< QUrl > &  urls)

Sets the list of List-Subscribe urls.

Definition at line 422 of file mailinglist.cpp.

void MailingList::setUnsubscribeUrls ( const QList< QUrl > &  urls)

Sets the list of List-Unsubscribe urls.

Definition at line 438 of file mailinglist.cpp.

QList< QUrl > MailingList::subscribeUrls ( ) const

Returns the list of List-Subscribe urls.

Definition at line 433 of file mailinglist.cpp.

QList< QUrl > MailingList::unsubscribeUrls ( ) const

Returns the list of List-Unsubscribe urls.

Definition at line 449 of file mailinglist.cpp.

void MailingList::writeConfig ( KConfigGroup group) const

Saves the configuration for the mailing list to the config group.

Definition at line 534 of file mailinglist.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat Sep 19 2020 23:12:53 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.