File indexing completed on 2024-04-21 04:01:00

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_MAPPER_ENCLOSURERSS2IMPL_H
0009 #define SYNDICATION_MAPPER_ENCLOSURERSS2IMPL_H
0010 
0011 #include <enclosure.h>
0012 #include <rss2/enclosure.h>
0013 #include <rss2/item.h>
0014 
0015 namespace Syndication
0016 {
0017 class EnclosureRSS2Impl;
0018 typedef QSharedPointer<EnclosureRSS2Impl> EnclosureRSS2ImplPtr;
0019 
0020 /**
0021  *
0022  * @internal
0023  * @author Frank Osterfeld
0024  */
0025 class EnclosureRSS2Impl : public Syndication::Enclosure
0026 {
0027 public:
0028     explicit EnclosureRSS2Impl(const Syndication::RSS2::Item &item, const Syndication::RSS2::Enclosure &enc);
0029 
0030     Q_REQUIRED_RESULT bool isNull() const override;
0031 
0032     Q_REQUIRED_RESULT QString url() const override;
0033 
0034     Q_REQUIRED_RESULT QString title() const override;
0035 
0036     Q_REQUIRED_RESULT QString type() const override;
0037 
0038     Q_REQUIRED_RESULT uint length() const override;
0039 
0040     Q_REQUIRED_RESULT uint duration() const override;
0041 
0042 private:
0043     Syndication::RSS2::Item m_item;
0044     Syndication::RSS2::Enclosure m_enclosure;
0045 };
0046 
0047 } // namespace Syndication
0048 
0049 #endif // SYNDICATION_MAPPER_ENCLOSURERSS2IMPL_H