• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • KDE Home
  • Contact Us
 

KMIME Library

kmime_newsarticle.cpp

00001 /*
00002     kmime_newsarticle.cpp
00003 
00004     KMime, the KDE Internet mail/usenet news message library.
00005     Copyright (c) 2001 the KMime authors.
00006     See file AUTHORS for details
00007 
00008     This library is free software; you can redistribute it and/or
00009     modify it under the terms of the GNU Library General Public
00010     License as published by the Free Software Foundation; either
00011     version 2 of the License, or (at your option) any later version.
00012 
00013     This library is distributed in the hope that it will be useful,
00014     but WITHOUT ANY WARRANTY; without even the implied warranty of
00015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016     Library General Public License for more details.
00017 
00018     You should have received a copy of the GNU Library General Public License
00019     along with this library; see the file COPYING.LIB.  If not, write to
00020     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00021     Boston, MA 02110-1301, USA.
00022 */
00023 
00024 #include "kmime_newsarticle.h"
00025 #include "kmime_message_p.h"
00026 #include "kmime_util_p.h"
00027 
00028 using namespace KMime;
00029 
00030 namespace KMime {
00031 
00032 class NewsArticlePrivate : public MessagePrivate
00033 {
00034   public:
00035     NewsArticlePrivate( NewsArticle *q ) : MessagePrivate( q )
00036     {
00037     }
00038 
00039     Q_DECLARE_PUBLIC(NewsArticle)
00040 };
00041 
00042 NewsArticle::NewsArticle()
00043   : Message( new NewsArticlePrivate( this ) )
00044 {
00045 }
00046 
00047 NewsArticle::~NewsArticle()
00048 {
00049 }
00050 
00051 void NewsArticle::parse()
00052 {
00053   // KDE5: remove this virtual reimplementation.
00054   Message::parse();
00055 }
00056 
00057 QByteArray NewsArticle::assembleHeaders()
00058 {
00059   // Create the mandatory Lines: field.
00060   lines( true );
00061 
00062   // Assemble all header fields.
00063   return Message::assembleHeaders();
00064 }
00065 
00066 void NewsArticle::clear()
00067 {
00068   // KDE5: remove this virtual reimplementation.
00069   Message::clear();
00070 }
00071 
00072 Headers::Base * NewsArticle::getHeaderByType( const char *type )
00073 {
00074   // KDE5: remove this virtual reimplementation.
00075   return headerByType( type );
00076 }
00077 
00078 Headers::Base * NewsArticle::headerByType( const char *type )
00079 {
00080   // KDE5: remove this virtual reimplementation.
00081   return Message::headerByType( type );
00082 }
00083 
00084 void NewsArticle::setHeader( Headers::Base *h )
00085 {
00086   // KDE5: remove this virtual reimplementation.
00087   Message::setHeader( h );
00088 }
00089 
00090 bool NewsArticle::removeHeader( const char *type )
00091 {
00092   // KDE5: remove this virtual reimplementation.
00093   return Message::removeHeader( type );
00094 }
00095 
00096 // @cond PRIVATE
00097 #define kmime_mk_header_accessor( type, method ) \
00098 Headers::type* NewsArticle::method( bool create ) { \
00099   return header<Headers::type>( create ); \
00100 }
00101 
00102 kmime_mk_header_accessor( Control, control )
00103 kmime_mk_header_accessor( Lines, lines )
00104 kmime_mk_header_accessor( Supersedes, supersedes )
00105 kmime_mk_header_accessor( MailCopiesTo, mailCopiesTo )
00106 kmime_mk_header_accessor( Newsgroups, newsgroups )
00107 kmime_mk_header_accessor( FollowUpTo, followUpTo )
00108 
00109 #undef kmime_mk_header_accessor
00110 // @endcond
00111 
00112 } // namespace KMime

KMIME Library

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

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal