KMime::NewsArticle

Search for usage in LXR

#include <newsarticle.h>

Inheritance diagram for KMime::NewsArticle:

Public Types

typedef QSharedPointer< NewsArticlePtr
 
- Public Types inherited from KMime::Message
typedef QSharedPointer< MessagePtr
 
- Public Types inherited from KMime::Content
enum  DecodedTextTrimOption { NoTrim , TrimNewlines , TrimSpaces }
 
typedef QList< KMime::Content * > List
 

Public Member Functions

 NewsArticle ()
 
 ~NewsArticle () override
 
const KMime::Headers::Controlcontrol () const
 
KMime::Headers::Controlcontrol (bool create=true)
 
const KMime::Headers::FollowUpTofollowUpTo () const
 
KMime::Headers::FollowUpTofollowUpTo (bool create=true)
 
const KMime::Headers::Lineslines () const
 
KMime::Headers::Lineslines (bool create=true)
 
const KMime::Headers::MailCopiesTomailCopiesTo () const
 
KMime::Headers::MailCopiesTomailCopiesTo (bool create=true)
 
const KMime::Headers::Newsgroupsnewsgroups () const
 
KMime::Headers::Newsgroupsnewsgroups (bool create=true)
 
const KMime::Headers::Supersedessupersedes () const
 
KMime::Headers::Supersedessupersedes (bool create=true)
 
- Public Member Functions inherited from KMime::Message
 Message ()
 
 ~Message () override
 
const KMime::Headers::Bccbcc () const
 
KMime::Headers::Bccbcc (bool create=true)
 
const KMime::Headers::Cccc () const
 
KMime::Headers::Cccc (bool create=true)
 
const KMime::Headers::Datedate () const
 
KMime::Headers::Datedate (bool create=true)
 
const KMime::Headers::Fromfrom () const
 
KMime::Headers::Fromfrom (bool create=true)
 
const KMime::Headers::InReplyToinReplyTo () const
 
KMime::Headers::InReplyToinReplyTo (bool create=true)
 
ContentmainBodyPart (const QByteArray &type=QByteArray())
 
const ContentmainBodyPart (const QByteArray &type=QByteArray()) const
 
const KMime::Headers::MessageIDmessageID () const
 
KMime::Headers::MessageIDmessageID (bool create=true)
 
const KMime::Headers::Organizationorganization () const
 
KMime::Headers::Organizationorganization (bool create=true)
 
const KMime::Headers::Referencesreferences () const
 
KMime::Headers::Referencesreferences (bool create=true)
 
const KMime::Headers::ReplyToreplyTo () const
 
KMime::Headers::ReplyToreplyTo (bool create=true)
 
const KMime::Headers::Sendersender () const
 
KMime::Headers::Sendersender (bool create=true)
 
const KMime::Headers::Subjectsubject () const
 
KMime::Headers::Subjectsubject (bool create=true)
 
const KMime::Headers::Toto () const
 
KMime::Headers::Toto (bool create=true)
 
const KMime::Headers::UserAgentuserAgent () const
 
KMime::Headers::UserAgentuserAgent (bool create=true)
 
- Public Member Functions inherited from KMime::Content
 Content (Content *parent=nullptr)
 
virtual ~Content ()
 
void appendContent (Content *content)
 
void appendHeader (Headers::Base *h)
 
void assemble ()
 
QList< Content * > attachments ()
 
auto attachments () const -> auto
 
QByteArray body () const
 
QSharedPointer< MessagebodyAsMessage ()
 
QSharedPointer< const MessagebodyAsMessage () const
 
bool bodyIsMessage () const
 
void changeEncoding (Headers::contentEncoding e)
 
void clear ()
 
void clearContents (bool del=true)
 
Contentcontent (const ContentIndex &index) const
 
const Headers::ContentDescriptioncontentDescription () const
 
Headers::ContentDescriptioncontentDescription (bool create=true)
 
const Headers::ContentDispositioncontentDisposition () const
 
Headers::ContentDispositioncontentDisposition (bool create=true)
 
const Headers::ContentIDcontentID () const
 
Headers::ContentIDcontentID (bool create=true)
 
const Headers::ContentLocationcontentLocation () const
 
Headers::ContentLocationcontentLocation (bool create=true)
 
QList< Content * > contents ()
 
auto contents () const -> auto
 
const Headers::ContentTransferEncodingcontentTransferEncoding () const
 
Headers::ContentTransferEncodingcontentTransferEncoding (bool create=true)
 
const Headers::ContentTypecontentType () const
 
Headers::ContentTypecontentType (bool create=true)
 
QByteArray decodedContent () const
 
QString decodedText (bool trimText, bool removeTrailingNewlines=false) const
 
QString decodedText (DecodedTextTrimOption trimOption=NoTrim) const
 
QByteArray encodedBody () const
 
QByteArray encodedContent (bool useCrLf=false) const
 
QByteArray epilogue () const
 
void fromUnicodeString (const QString &s)
 
bool hasContent () const
 
bool hasHeader (QByteArrayView type) const
 
QByteArray head () const
 
template<typename T >
T * header () const
 
template<typename T >
T * header (bool create=false)
 
Headers::BaseheaderByType (QByteArrayView type) const
 
QList< Headers::Base * > headers ()
 
auto headers () const -> auto
 
QList< Headers::Base * > headersByType (QByteArrayView type) const
 
ContentIndex index () const
 
ContentIndex indexForContent (Content *content) const
 
bool isFrozen () const
 
bool isTopLevel () const
 
Contentparent ()
 
const Contentparent () const
 
void parse ()
 
QByteArray preamble () const
 
void prependContent (Content *content)
 
template<typename T >
bool removeHeader ()
 
bool removeHeader (QByteArrayView type)
 
void replaceContent (Content *oldContent, Content *newContent)
 
void setBody (const QByteArray &body)
 
void setContent (const QByteArray &s)
 
void setEncodedBody (const QByteArray &body)
 
void setEpilogue (const QByteArray &epilogue)
 
void setFrozen (bool frozen=true)
 
void setHead (const QByteArray &head)
 
void setHeader (Headers::Base *h)
 
void setParent (Content *parent)
 
void setPreamble (const QByteArray &preamble)
 
qsizetype size () const
 
qsizetype storageSize () const
 
ContenttakeContent (Content *content)
 
ContenttextContent ()
 
const ContenttextContent () const
 
ContenttopLevel ()
 
const ContenttopLevel () const
 

Protected Member Functions

QByteArray assembleHeaders () override
 
- Protected Member Functions inherited from KMime::Message
- Protected Member Functions inherited from KMime::Content

Additional Inherited Members

- Static Public Member Functions inherited from KMime::Message
static QString mimeType ()
 

Detailed Description

NNTP news article.

Definition at line 21 of file newsarticle.h.

Member Typedef Documentation

◆ Ptr

A shared pointer to a news article.

Definition at line 27 of file newsarticle.h.

Constructor & Destructor Documentation

◆ NewsArticle()

KMime::NewsArticle::NewsArticle ( )
default

Creates a NewsArticle object.

◆ ~NewsArticle()

KMime::NewsArticle::~NewsArticle ( )
overridedefault

Destroys this NewsArticle.

Member Function Documentation

◆ assembleHeaders()

QByteArray KMime::NewsArticle::assembleHeaders ( )
overrideprotectedvirtual

Reimplement this method if you need to assemble additional headers in a derived class.

Don't forget to call the implementation of the base class.

Returns
The raw, assembled headers.

Reimplemented from KMime::Message.

Definition at line 22 of file newsarticle.cpp.

◆ control() [1/2]

const KMime::Headers::Control * KMime::NewsArticle::control ( ) const
nodiscard

Returns the Control header.

Can be nullptr if the header doesn't exist.

Since
24.08

◆ control() [2/2]

KMime::Headers::Control * KMime::NewsArticle::control ( bool create = true)

Returns the Control header.

Parameters
createIf true, create the header if it doesn't exist yet.

◆ followUpTo() [1/2]

const KMime::Headers::FollowUpTo * KMime::NewsArticle::followUpTo ( ) const
nodiscard

Returns the Follow-Up-To header.

Can be nullptr if the header doesn't exist.

Since
24.08

◆ followUpTo() [2/2]

KMime::Headers::FollowUpTo * KMime::NewsArticle::followUpTo ( bool create = true)

Returns the Follow-Up-To header.

Parameters
createIf true, create the header if it doesn't exist yet.

◆ lines() [1/2]

const KMime::Headers::Lines * KMime::NewsArticle::lines ( ) const
nodiscard

Returns the Lines header.

Can be nullptr if the header doesn't exist.

Since
24.08

◆ lines() [2/2]

KMime::Headers::Lines * KMime::NewsArticle::lines ( bool create = true)

Returns the Lines header.

Parameters
createIf true, create the header if it doesn't exist yet.

◆ mailCopiesTo() [1/2]

const KMime::Headers::MailCopiesTo * KMime::NewsArticle::mailCopiesTo ( ) const
nodiscard

Returns the Mail-Copies-To header.

Can be nullptr if the header doesn't exist.

Since
24.08

◆ mailCopiesTo() [2/2]

KMime::Headers::MailCopiesTo * KMime::NewsArticle::mailCopiesTo ( bool create = true)

Returns the Mail-Copies-To header.

Parameters
createIf true, create the header if it doesn't exist yet.

◆ newsgroups() [1/2]

const KMime::Headers::Newsgroups * KMime::NewsArticle::newsgroups ( ) const
nodiscard

Returns the Newsgroups header.

Can be nullptr if the header doesn't exist.

Since
24.08

◆ newsgroups() [2/2]

KMime::Headers::Newsgroups * KMime::NewsArticle::newsgroups ( bool create = true)

Returns the Newsgroups header.

Parameters
createIf true, create the header if it doesn't exist yet.

◆ supersedes() [1/2]

const KMime::Headers::Supersedes * KMime::NewsArticle::supersedes ( ) const
nodiscard

Returns the Supersedes header.

Can be nullptr if the header doesn't exist.

Since
24.08

◆ supersedes() [2/2]

KMime::Headers::Supersedes * KMime::NewsArticle::supersedes ( bool create = true)

Returns the Supersedes header.

Parameters
createIf true, create the header if it doesn't exist yet.

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 Mon Nov 18 2024 12:18:08 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.