• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

KMIME Library

  • kmime
kmime_newsarticle.cpp
1/*
2 kmime_newsarticle.cpp
3
4 KMime, the KDE Internet mail/usenet news message library.
5 Copyright (c) 2001 the KMime authors.
6 See file AUTHORS for details
7
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Library General Public
10 License as published by the Free Software Foundation; either
11 version 2 of the License, or (at your option) any later version.
12
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Library General Public License for more details.
17
18 You should have received a copy of the GNU Library General Public License
19 along with this library; see the file COPYING.LIB. If not, write to
20 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA.
22*/
23
24#include "kmime_newsarticle.h"
25#include "kmime_message_p.h"
26#include "kmime_util_p.h"
27
28using namespace KMime;
29
30namespace KMime {
31
32class NewsArticlePrivate : public MessagePrivate
33{
34 public:
35 NewsArticlePrivate( NewsArticle *q ) : MessagePrivate( q )
36 {
37 }
38
39 Q_DECLARE_PUBLIC( NewsArticle )
40};
41
42NewsArticle::NewsArticle()
43 : Message( new NewsArticlePrivate( this ) )
44{
45}
46
47NewsArticle::~NewsArticle()
48{
49}
50
51void NewsArticle::parse()
52{
53 // KDE5: remove this virtual reimplementation.
54 Message::parse();
55}
56
57QByteArray NewsArticle::assembleHeaders()
58{
59 // Create the mandatory Lines: field.
60 lines( true );
61
62 // Assemble all header fields.
63 return Message::assembleHeaders();
64}
65
66void NewsArticle::clear()
67{
68 // KDE5: remove this virtual reimplementation.
69 Message::clear();
70}
71
72Headers::Base * NewsArticle::getHeaderByType( const char *type )
73{
74 // KDE5: remove this virtual reimplementation.
75 return headerByType( type );
76}
77
78Headers::Base * NewsArticle::headerByType( const char *type )
79{
80 // KDE5: remove this virtual reimplementation.
81 return Message::headerByType( type );
82}
83
84void NewsArticle::setHeader( Headers::Base *h )
85{
86 // KDE5: remove this virtual reimplementation.
87 Message::setHeader( h );
88}
89
90bool NewsArticle::removeHeader( const char *type )
91{
92 // KDE5: remove this virtual reimplementation.
93 return Message::removeHeader( type );
94}
95
96// @cond PRIVATE
97#define kmime_mk_header_accessor( type, method ) \
98Headers::type* NewsArticle::method( bool create ) { \
99 return header<Headers::type>( create ); \
100}
101
102kmime_mk_header_accessor( Control, control )
103kmime_mk_header_accessor( Lines, lines )
104kmime_mk_header_accessor( Supersedes, supersedes )
105kmime_mk_header_accessor( MailCopiesTo, mailCopiesTo )
106kmime_mk_header_accessor( Newsgroups, newsgroups )
107kmime_mk_header_accessor( FollowUpTo, followUpTo )
108
109#undef kmime_mk_header_accessor
110// @endcond
111
112} // namespace KMime
KMime::Headers::Base
Baseclass of all header-classes.
Definition kmime_headers.h:125
KMime::KAutoDeleteHash
The KAutoDeleteHash class is a convenience QHash subclass that provides automatic deletion of the val...
Definition kautodeletehash.h:50
KMime::Message
Represents a (email) message.
Definition kmime_message.h:82
KMime::Message::parse
virtual void parse()
Parses the Content.
Definition kmime_message.cpp:48
KMime::Message::assembleHeaders
virtual QByteArray assembleHeaders()
Reimplement this method if you need to assemble additional headers in a derived class.
Definition kmime_message.cpp:54
KMime::Message::headerByType
virtual KMime::Headers::Base * headerByType(const char *type)
Returns the first header of type type, if it exists.
Definition kmime_message.cpp:80
KMime::Message::clear
virtual void clear()
Clears the content, deleting all headers and sub-Contents.
Definition kmime_message.cpp:68
KMime::Message::removeHeader
virtual bool removeHeader(const char *type)
Searches for the first header of type type, and deletes it, removing it from this Content.
Definition kmime_message.cpp:92
KMime::Message::setHeader
virtual void setHeader(KMime::Headers::Base *h)
Sets the specified header to this Content.
Definition kmime_message.cpp:86
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KMIME Library

Skip menu "KMIME Library"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Related Pages

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal