1 | /* |
2 | This file is part of the syndication library |
3 | SPDX-FileCopyrightText: 2005 Frank Osterfeld <osterfeld@kde.org> |
4 | |
5 | SPDX-License-Identifier: LGPL-2.0-or-later |
6 | */ |
7 | |
8 | #ifndef SYNDICATION_RSS2_ENCLOSURE_H |
9 | #define |
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 : public ElementWrapper |
29 | { |
30 | public: |
31 | /** |
32 | * Default constructor, creates a null object, for which isNull() is |
33 | * @c true. |
34 | */ |
35 | (); |
36 | |
37 | /** |
38 | * Creates an Enclosure object wrapping an @c <enclosure> XML element. |
39 | * |
40 | * @param element The @c <enclosure> element to wrap |
41 | */ |
42 | explicit (const QDomElement &element); |
43 | |
44 | /** |
45 | * returns the URL of the enclosure |
46 | */ |
47 | QString () const; |
48 | |
49 | /** |
50 | * returns the size of the enclosure in bytes |
51 | */ |
52 | int () const; |
53 | |
54 | /** |
55 | * returns the mime type of the enclosure |
56 | * (e.g. "audio/mpeg") |
57 | */ |
58 | QString () const; |
59 | |
60 | /** |
61 | * Returns a description of the object for debugging purposes. |
62 | * |
63 | * @return debug string |
64 | */ |
65 | QString () const; |
66 | }; |
67 | |
68 | } // namespace RSS2 |
69 | } // namespace Syndication |
70 | |
71 | #endif // SYNDICATION_RSS2_ENCLOSURE_H |
72 | |