File indexing completed on 2022-10-04 16:37:47

0001 /*
0002     kmime_newsarticle.cpp
0003 
0004     KMime, the KDE Internet mail/usenet news message library.
0005     SPDX-FileCopyrightText: 2001 the KMime authors.
0006     See file AUTHORS for details
0007 
0008     SPDX-License-Identifier: LGPL-2.0-or-later
0009 */
0010 
0011 #include "kmime_newsarticle.h"
0012 #include "kmime_util_p.h"
0013 
0014 using namespace KMime;
0015 
0016 namespace KMime
0017 {
0018 
0019 NewsArticle::NewsArticle() : Message()
0020 {
0021 }
0022 
0023 NewsArticle::~NewsArticle() = default;
0024 
0025 QByteArray NewsArticle::assembleHeaders()
0026 {
0027     // Create the mandatory Lines: field.
0028     lines(true);
0029 
0030     // Assemble all header fields.
0031     return Message::assembleHeaders();
0032 }
0033 
0034 // @cond PRIVATE
0035 #define kmime_mk_header_accessor( type, method ) \
0036     Headers::type* NewsArticle::method( bool create ) { \
0037         return header<Headers::type>( create ); \
0038     }
0039 
0040 kmime_mk_header_accessor(Control, control)
0041 kmime_mk_header_accessor(Lines, lines)
0042 kmime_mk_header_accessor(Supersedes, supersedes)
0043 kmime_mk_header_accessor(MailCopiesTo, mailCopiesTo)
0044 kmime_mk_header_accessor(Newsgroups, newsgroups)
0045 kmime_mk_header_accessor(FollowUpTo, followUpTo)
0046 
0047 #undef kmime_mk_header_accessor
0048 // @endcond
0049 
0050 } // namespace KMime