Syndication

rss2/enclosure.h
1 /*
2  This file is part of the syndication library
3  SPDX-FileCopyrightText: 2005 Frank Osterfeld <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7 
8 #ifndef SYNDICATION_RSS2_ENCLOSURE_H
9 #define SYNDICATION_RSS2_ENCLOSURE_H
10 
11 #include <syndication/elementwrapper.h>
12 
13 class QDomElement;
14 class QString;
15 
16 namespace Syndication
17 {
18 namespace RSS2
19 {
20 /**
21  * Describes a media object that is "attached" to the item.
22  * The most common use case for enclosures are podcasts:
23  * An audio file is attached to the feed and can be
24  * automatically downloaded by a podcast client.
25  *
26  * @author Frank Osterfeld
27  */
28 class SYNDICATION_EXPORT Enclosure : public ElementWrapper
29 {
30 public:
31  /**
32  * Default constructor, creates a null object, for which isNull() is
33  * @c true.
34  */
35  Enclosure();
36 
37  /**
38  * Creates an Enclosure object wrapping an @c &lt;enclosure> XML element.
39  *
40  * @param element The @c &lt;enclosure> element to wrap
41  */
42  explicit Enclosure(const QDomElement &element);
43 
44  /**
45  * returns the URL of the enclosure
46  */
47  QString url() const;
48 
49  /**
50  * returns the size of the enclosure in bytes
51  */
52  int length() const;
53 
54  /**
55  * returns the mime type of the enclosure
56  * (e.g. "audio/mpeg")
57  */
58  QString type() const;
59 
60  /**
61  * Returns a description of the object for debugging purposes.
62  *
63  * @return debug string
64  */
65  QString debugInfo() const;
66 };
67 
68 } // namespace RSS2
69 } // namespace Syndication
70 
71 #endif // SYNDICATION_RSS2_ENCLOSURE_H
A wrapper for XML elements.
Describes a media object that is "attached" to the item.
PartitionTable::TableType type
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Jan 15 2022 22:55:04 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.