KMime

newsarticle.h
1/*
2 kmime_newsarticle.h
3
4 KMime, the KDE Internet mail/usenet news message library.
5 SPDX-FileCopyrightText: 2001 the KMime authors.
6 See file AUTHORS for details
7
8 SPDX-License-Identifier: LGPL-2.0-or-later
9*/
10#pragma once
11
12#include "kmime_export.h"
13#include "message.h"
14
15#include <QSharedPointer>
16
17namespace KMime
18{
19
20/** NNTP news article. */
21class KMIME_EXPORT NewsArticle : public Message
22{
23public:
24 /**
25 A shared pointer to a news article.
26 */
28
29 ///@cond PRIVATE
30 // needed for Akonadi polymorphic payload support
31 typedef Message SuperClass;
32 ///@endcond
33
34 /**
35 Creates a NewsArticle object.
36 */
38
39 /**
40 Destroys this NewsArticle.
41 */
42 ~NewsArticle() override;
43
44 /**
45 Returns the Control header.
46 @param create If true, create the header if it doesn't exist yet.
47 */
48 KMime::Headers::Control *control(bool create = true);
49 /**
50 Returns the Control header.
51 Can be @c nullptr if the header doesn't exist.
52 @since 24.08
53 */
54 [[nodiscard]] const KMime::Headers::Control *control() const;
55
56 /**
57 Returns the Supersedes header.
58 @param create If true, create the header if it doesn't exist yet.
59 */
61 /**
62 Returns the Supersedes header.
63 Can be @c nullptr if the header doesn't exist.
64 @since 24.08
65 */
66 [[nodiscard]] const KMime::Headers::Supersedes *supersedes() const;
67
68 /**
69 Returns the Mail-Copies-To header.
70 @param create If true, create the header if it doesn't exist yet.
71 */
73 /**
74 Returns the Mail-Copies-To header.
75 Can be @c nullptr if the header doesn't exist.
76 @since 24.08
77 */
78 [[nodiscard]] const KMime::Headers::MailCopiesTo *mailCopiesTo() const;
79
80 /**
81 Returns the Newsgroups header.
82 @param create If true, create the header if it doesn't exist yet.
83 */
85 /**
86 Returns the Newsgroups header.
87 Can be @c nullptr if the header doesn't exist.
88 @since 24.08
89 */
90 [[nodiscard]] const KMime::Headers::Newsgroups *newsgroups() const;
91
92 /**
93 Returns the Follow-Up-To header.
94 @param create If true, create the header if it doesn't exist yet.
95 */
97 /**
98 Returns the Follow-Up-To header.
99 Can be @c nullptr if the header doesn't exist.
100 @since 24.08
101 */
102 [[nodiscard]] const KMime::Headers::FollowUpTo *followUpTo() const;
103
104 /**
105 Returns the Lines header.
106 @param create If true, create the header if it doesn't exist yet.
107 */
108 KMime::Headers::Lines *lines(bool create = true);
109 /**
110 Returns the Lines header.
111 Can be @c nullptr if the header doesn't exist.
112 @since 24.08
113 */
114 [[nodiscard]] const KMime::Headers::Lines *lines() const;
115
116protected:
117 QByteArray assembleHeaders() override;
118}; // class NewsArticle
119
120} // namespace KMime
121
Represents a "Control" header.
Definition headers.h:1254
Represents a "Followup-To" header.
Definition headers.h:1372
Represents a "Lines" header.
Definition headers.h:1386
Represents a "Mail-Copies-To" header.
Definition headers.h:816
Represents a "Newsgroups" header.
Definition headers.h:1332
Represents a "Supersedes" header.
Definition headers.h:950
Represents a (email) message.
Definition message.h:65
NNTP news article.
Definition newsarticle.h:22
const KMime::Headers::FollowUpTo * followUpTo() const
Returns the Follow-Up-To header.
const KMime::Headers::MailCopiesTo * mailCopiesTo() const
Returns the Mail-Copies-To header.
const KMime::Headers::Newsgroups * newsgroups() const
Returns the Newsgroups header.
KMime::Headers::FollowUpTo * followUpTo(bool create=true)
Returns the Follow-Up-To header.
KMime::Headers::Control * control(bool create=true)
Returns the Control header.
KMime::Headers::Supersedes * supersedes(bool create=true)
Returns the Supersedes header.
const KMime::Headers::Lines * lines() const
Returns the Lines header.
NewsArticle()
Creates a NewsArticle object.
QSharedPointer< NewsArticle > Ptr
A shared pointer to a news article.
Definition newsarticle.h:27
const KMime::Headers::Supersedes * supersedes() const
Returns the Supersedes header.
~NewsArticle() override
Destroys this NewsArticle.
KMime::Headers::Newsgroups * newsgroups(bool create=true)
Returns the Newsgroups header.
KMime::Headers::MailCopiesTo * mailCopiesTo(bool create=true)
Returns the Mail-Copies-To header.
KMime::Headers::Lines * lines(bool create=true)
Returns the Lines header.
const KMime::Headers::Control * control() const
Returns the Control header.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:47:48 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.