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

KMIME Library

  • sources
  • kde-4.14
  • kdepimlibs
  • 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 
28 using namespace KMime;
29 
30 namespace KMime {
31 
32 class NewsArticlePrivate : public MessagePrivate
33 {
34  public:
35  NewsArticlePrivate( NewsArticle *q ) : MessagePrivate( q )
36  {
37  }
38 
39  Q_DECLARE_PUBLIC( NewsArticle )
40 };
41 
42 NewsArticle::NewsArticle()
43  : Message( new NewsArticlePrivate( this ) )
44 {
45 }
46 
47 NewsArticle::~NewsArticle()
48 {
49 }
50 
51 void NewsArticle::parse()
52 {
53  // KDE5: remove this virtual reimplementation.
54  Message::parse();
55 }
56 
57 QByteArray NewsArticle::assembleHeaders()
58 {
59  // Create the mandatory Lines: field.
60  lines( true );
61 
62  // Assemble all header fields.
63  return Message::assembleHeaders();
64 }
65 
66 void NewsArticle::clear()
67 {
68  // KDE5: remove this virtual reimplementation.
69  Message::clear();
70 }
71 
72 Headers::Base * NewsArticle::getHeaderByType( const char *type )
73 {
74  // KDE5: remove this virtual reimplementation.
75  return headerByType( type );
76 }
77 
78 Headers::Base * NewsArticle::headerByType( const char *type )
79 {
80  // KDE5: remove this virtual reimplementation.
81  return Message::headerByType( type );
82 }
83 
84 void NewsArticle::setHeader( Headers::Base *h )
85 {
86  // KDE5: remove this virtual reimplementation.
87  Message::setHeader( h );
88 }
89 
90 bool 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 ) \
98 Headers::type* NewsArticle::method( bool create ) { \
99  return header<Headers::type>( create ); \
100 }
101 
102 kmime_mk_header_accessor( Control, control )
103 kmime_mk_header_accessor( Lines, lines )
104 kmime_mk_header_accessor( Supersedes, supersedes )
105 kmime_mk_header_accessor( MailCopiesTo, mailCopiesTo )
106 kmime_mk_header_accessor( Newsgroups, newsgroups )
107 kmime_mk_header_accessor( FollowUpTo, followUpTo )
108 
109 #undef kmime_mk_header_accessor
110 // @endcond
111 
112 } // namespace KMime
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
QByteArray
KMime::Message::clear
virtual void clear()
Clears the content, deleting all headers and sub-Contents.
Definition: kmime_message.cpp:68
KMime::Message::setHeader
virtual void setHeader(KMime::Headers::Base *h)
Sets the specified header to this Content.
Definition: kmime_message.cpp:86
KMime::Headers::Base
Baseclass of all header-classes.
Definition: kmime_headers.h:124
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
Represents a (email) message.
Definition: kmime_message.h:81
KMime::Message::parse
virtual void parse()
Parses the Content.
Definition: kmime_message.cpp:48
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
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:37:18 by doxygen 1.8.7 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 API Reference

Skip menu "kdepimlibs 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

Search



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