KMime::NewsArticle

#include <kmime_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
typedef QVector< KMime::Content * > List
 

Public Member Functions

 NewsArticle ()
 
 ~NewsArticle () override
 
KMime::Headers::Controlcontrol (bool create=true)
 
KMime::Headers::FollowUpTofollowUpTo (bool create=true)
 
KMime::Headers::Lineslines (bool create=true)
 
KMime::Headers::MailCopiesTomailCopiesTo (bool create=true)
 
KMime::Headers::Newsgroupsnewsgroups (bool create=true)
 
KMime::Headers::Supersedessupersedes (bool create=true)
 
- Public Member Functions inherited from KMime::Message
 Message ()
 
 ~Message () override
 
KMime::Headers::Bccbcc (bool create=true)
 
KMime::Headers::Cccc (bool create=true)
 
KMime::Headers::Datedate (bool create=true)
 
KMime::Headers::Fromfrom (bool create=true)
 
KMime::Headers::InReplyToinReplyTo (bool create=true)
 
ContentmainBodyPart (const QByteArray &type=QByteArray())
 
KMime::Headers::MessageIDmessageID (bool create=true)
 
KMime::Headers::Organizationorganization (bool create=true)
 
KMime::Headers::Referencesreferences (bool create=true)
 
KMime::Headers::ReplyToreplyTo (bool create=true)
 
KMime::Headers::Sendersender (bool create=true)
 
KMime::Headers::Subjectsubject (bool create=true)
 
KMime::Headers::Toto (bool create=true)
 
KMime::Headers::UserAgentuserAgent (bool create=true)
 
- Public Member Functions inherited from KMime::Content
 Content (Content *parent=nullptr)
 
virtual ~Content ()
 
void addContent (Content *content, bool prepend=false)
 
void appendHeader (Headers::Base *h)
 
void assemble ()
 
QVector< Content * > attachments ()
 
QByteArray body () const
 
QSharedPointer< MessagebodyAsMessage () const
 
bool bodyIsMessage () const
 
void changeEncoding (Headers::contentEncoding e)
 
void clear ()
 
void clearContents (bool del=true)
 
Contentcontent (const ContentIndex &index) const
 
Headers::ContentDescriptioncontentDescription (bool create=true)
 
Headers::ContentDispositioncontentDisposition (bool create=true)
 
Headers::ContentIDcontentID (bool create=true)
 
Headers::ContentLocationcontentLocation (bool create=true)
 
QVector< Content * > contents () const
 
Headers::ContentTransferEncodingcontentTransferEncoding (bool create=true)
 
Headers::ContentTypecontentType (bool create=true)
 
QByteArray decodedContent ()
 
QString decodedText (bool trimText=false, bool removeTrailingNewlines=false)
 
QByteArray encodedBody ()
 
QByteArray encodedContent (bool useCrLf=false)
 
QByteArray epilogue () const
 
void fromUnicodeString (const QString &s)
 
bool hasContent () const
 
bool hasHeader (const char *type) const
 
QByteArray head () const
 
template<typename T >
T * header (bool create=false)
 
Headers::BaseheaderByType (const char *type) const
 
QVector< Headers::Base * > headers () const
 
QVector< Headers::Base * > headersByType (const char *type) const
 
ContentIndex index () const
 
ContentIndex indexForContent (Content *content) const
 
bool isFrozen () const
 
bool isTopLevel () const
 
int lineCount () const
 
Contentparent () const
 
void parse ()
 
QByteArray preamble () const
 
void removeContent (Content *content, bool del=false)
 
bool removeHeader (const char *type)
 
template<typename T >
bool removeHeader ()
 
void replaceContent (Content *oldContent, Content *newContent)
 
void setBody (const QByteArray &body)
 
void setContent (const QByteArray &s)
 
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)
 
int size ()
 
int storageSize () const
 
ContenttextContent ()
 
ContenttopLevel () const
 

Protected Member Functions

QByteArray assembleHeaders () override
 

Additional Inherited Members

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

Detailed Description

NNTP news article.

Definition at line 35 of file kmime_newsarticle.h.

Member Typedef Documentation

A shared pointer to a news article.

Definition at line 41 of file kmime_newsarticle.h.

Constructor & Destructor Documentation

KMime::NewsArticle::NewsArticle ( )

Creates a NewsArticle object.

Definition at line 32 of file kmime_newsarticle.cpp.

KMime::NewsArticle::~NewsArticle ( )
override

Destroys this NewsArticle.

Definition at line 36 of file kmime_newsarticle.cpp.

Member Function Documentation

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 40 of file kmime_newsarticle.cpp.

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.
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.
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.
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.
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.
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-2020 The KDE developers.
Generated on Thu Jul 9 2020 23:11:06 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.