MessageCore::MailingList

Search for usage in LXR

#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 zack@.nosp@m.kde..nosp@m.org

Definition at line 31 of file mailinglist.h.

Member Typedef Documentation

◆ Features

Member Enumeration Documentation

◆ Feature

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.

◆ Handler

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() [1/2]

MailingList::MailingList ( )

Creates an empty mailing list.

Definition at line 349 of file mailinglist.cpp.

◆ MailingList() [2/2]

MailingList::MailingList ( const MailingList & other)
default

Creates a mailing list from an other mailing list.

◆ ~MailingList()

MailingList::~MailingList ( )
default

Destroys the mailing list.

Member Function Documentation

◆ archivedAtUrls()

QList< QUrl > MailingList::archivedAtUrls ( ) const
nodiscard

Returns the Archived-At url.

Definition at line 498 of file mailinglist.cpp.

◆ archiveUrls()

QList< QUrl > MailingList::archiveUrls ( ) const
nodiscard

Returns the list of List-Archive urls.

Definition at line 466 of file mailinglist.cpp.

◆ detect()

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

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

Definition at line 290 of file mailinglist.cpp.

◆ features()

MailingList::Features MailingList::features ( ) const
nodiscard

Returns the features the mailing list supports.

Definition at line 376 of file mailinglist.cpp.

◆ handler()

MailingList::Handler MailingList::handler ( ) const
nodiscard

Returns the handler for the mailing list.

Definition at line 386 of file mailinglist.cpp.

◆ helpUrls()

QList< QUrl > MailingList::helpUrls ( ) const
nodiscard

Returns the list of List-Help urls.

Definition at line 450 of file mailinglist.cpp.

◆ id()

QString MailingList::id ( ) const
nodiscard

Returns the id of the mailing list.

Definition at line 514 of file mailinglist.cpp.

◆ name()

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

Definition at line 329 of file mailinglist.cpp.

◆ operator=()

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

Overwrites this mailing list with an other mailing list.

Definition at line 358 of file mailinglist.cpp.

◆ operator==()

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

Definition at line 367 of file mailinglist.cpp.

◆ ownerUrls()

QList< QUrl > MailingList::ownerUrls ( ) const
nodiscard

Returns the list of List-Owner urls.

Definition at line 482 of file mailinglist.cpp.

◆ postUrls()

QList< QUrl > MailingList::postUrls ( ) const
nodiscard

Returns the list of List-Post urls.

Definition at line 402 of file mailinglist.cpp.

◆ readConfig()

void MailingList::readConfig ( const KConfigGroup & group)

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

Definition at line 584 of file mailinglist.cpp.

◆ setArchivedAtUrls()

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

Sets the Archived-At url.

Definition at line 487 of file mailinglist.cpp.

◆ setArchiveUrls()

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

Sets the list of List-Archive urls.

Definition at line 455 of file mailinglist.cpp.

◆ setHandler()

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

Sets the handler for the mailing list.

Definition at line 381 of file mailinglist.cpp.

◆ setHelpUrls()

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

Sets the list of List-Help urls.

Definition at line 439 of file mailinglist.cpp.

◆ setId()

void MailingList::setId ( const QString & id)

Sets the id of the mailing list.

Definition at line 503 of file mailinglist.cpp.

◆ setOwnerUrls()

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

Sets the list of List-Owner urls.

Definition at line 471 of file mailinglist.cpp.

◆ setPostUrls()

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

Sets the list of List-Post urls.

Definition at line 391 of file mailinglist.cpp.

◆ setSubscribeUrls()

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

Sets the list of List-Subscribe urls.

Definition at line 407 of file mailinglist.cpp.

◆ setUnsubscribeUrls()

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

Sets the list of List-Unsubscribe urls.

Definition at line 423 of file mailinglist.cpp.

◆ subscribeUrls()

QList< QUrl > MailingList::subscribeUrls ( ) const
nodiscard

Returns the list of List-Subscribe urls.

Definition at line 418 of file mailinglist.cpp.

◆ unsubscribeUrls()

QList< QUrl > MailingList::unsubscribeUrls ( ) const
nodiscard

Returns the list of List-Unsubscribe urls.

Definition at line 434 of file mailinglist.cpp.

◆ writeConfig()

void MailingList::writeConfig ( KConfigGroup & group) const

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

Definition at line 519 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-2024 The KDE developers.
Generated on Fri Oct 4 2024 11:53:55 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.