File indexing completed on 2024-07-14 03:59:03

0001 /*
0002     This file is part of the syndication library
0003     SPDX-FileCopyrightText: 2006 Frank Osterfeld <osterfeld@kde.org>
0004 
0005     SPDX-License-Identifier: LGPL-2.0-or-later
0006 */
0007 
0008 #ifndef SYNDICATION_MAPPERRSS2IMPL_H
0009 #define SYNDICATION_MAPPERRSS2IMPL_H
0010 
0011 #include "feedrss2impl.h"
0012 
0013 #include <feed.h>
0014 #include <mapper.h>
0015 #include <rss2/document.h>
0016 #include <specificdocument.h>
0017 
0018 namespace Syndication
0019 {
0020 /** @internal */
0021 class RSS2Mapper : public Mapper<Feed>
0022 {
0023     QSharedPointer<Feed> map(SpecificDocumentPtr doc) const override
0024     {
0025         return QSharedPointer<Feed>(new FeedRSS2Impl(doc.staticCast<RSS2::Document>()));
0026     }
0027 };
0028 
0029 } // namespace Syndication
0030 
0031 #endif // SYNDICATION_MAPPERRSS2IMPL_H