KMime

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 "kmime_message.h"
14 
15 #include <QSharedPointer>
16 
17 namespace KMime
18 {
19 
20 /** NNTP news article. */
21 class KMIME_EXPORT NewsArticle : public Message
22 {
23 public:
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  */
37  NewsArticle();
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  /**
51  Returns the Supersedes header.
52  @param create If true, create the header if it doesn't exist yet.
53  */
54  KMime::Headers::Supersedes *supersedes(bool create = true);
55 
56  /**
57  Returns the Mail-Copies-To header.
58  @param create If true, create the header if it doesn't exist yet.
59  */
60  KMime::Headers::MailCopiesTo *mailCopiesTo(bool create = true);
61 
62  /**
63  Returns the Newsgroups header.
64  @param create If true, create the header if it doesn't exist yet.
65  */
66  KMime::Headers::Newsgroups *newsgroups(bool create = true);
67 
68  /**
69  Returns the Follow-Up-To header.
70  @param create If true, create the header if it doesn't exist yet.
71  */
72  KMime::Headers::FollowUpTo *followUpTo(bool create = true);
73 
74  /**
75  Returns the Lines header.
76  @param create If true, create the header if it doesn't exist yet.
77  */
78  KMime::Headers::Lines *lines(bool create = true);
79 
80 protected:
81  QByteArray assembleHeaders() override;
82 }; // class NewsArticle
83 
84 } // namespace KMime
85 
Represents a "Mail-Copies-To" header.
Represents a "Followup-To" header.
Represents a "Control" header.
NNTP news article.
Represents a "Lines" header.
QSharedPointer< NewsArticle > Ptr
A shared pointer to a news article.
Represents a "Newsgroups" header.
Represents a (email) message.
Definition: kmime_message.h:66
Represents a "Supersedes" header.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Sep 27 2021 23:15:57 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.