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_CATEGORY_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 | * A category which can be assigned to items or whole feeds. |
22 | * These can be simple tags as known from delicious or Technorati, or |
23 | * a category from a hierarchical taxonomy or ontology. |
24 | * |
25 | * @author Frank Osterfeld |
26 | */ |
27 | class : public ElementWrapper |
28 | { |
29 | public: |
30 | /** |
31 | * Creates a Category object wrapping a @c <category> XML element. |
32 | * |
33 | * @param element The @c <category> element to wrap |
34 | */ |
35 | explicit (const QDomElement &element); |
36 | |
37 | /** |
38 | * Default constructor, creates a null object, for which isNull() is |
39 | * @c true. |
40 | */ |
41 | (); |
42 | |
43 | /** |
44 | * Name of the category. This is both to be used as identifier and as |
45 | * human-readable string. It can bea forward-slash-separated string |
46 | * to identify a hierarchic location in the domain indicated by |
47 | * domain(). Examples: "General", "Programming", "Funny", |
48 | * "Books/History". |
49 | * |
50 | * @return The category identifier/name as string or a null string for |
51 | * null objects. |
52 | * |
53 | */ |
54 | QString () const; |
55 | |
56 | /** |
57 | * optional, identifies the domain of the category, i.e. a |
58 | * categorization taxonomy. |
59 | * |
60 | * @return The domain of the category, or a null string if none is set |
61 | * (and for null objects) |
62 | */ |
63 | QString domain() const; |
64 | |
65 | /** |
66 | * Returns a description of the object for debugging purposes. |
67 | * |
68 | * @return debug string |
69 | */ |
70 | QString () const; |
71 | }; |
72 | |
73 | } // namespace RSS2 |
74 | } // namespace Syndication |
75 | |
76 | #endif // SYNDICATION_RSS2_CATEGORY_H |
77 | |