Syndication

atom/person.cpp
1 /*
2  This file is part of the syndication library
3  SPDX-FileCopyrightText: 2006 Frank Osterfeld <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7 
8 #include "person.h"
9 #include "constants.h"
10 
11 #include <QString>
12 
13 namespace Syndication
14 {
15 namespace Atom
16 {
18  : ElementWrapper()
19 {
20 }
21 
22 Person::Person(const QDomElement &element)
23  : ElementWrapper(element)
24 {
25 }
26 
28 {
29  return extractElementTextNS(atom1Namespace(), QStringLiteral("name"));
30 }
31 
33 {
34  return completeURI(extractElementTextNS(atom1Namespace(), QStringLiteral("uri")));
35 }
36 
38 {
39  return extractElementTextNS(atom1Namespace(), QStringLiteral("email"));
40 }
41 
43 {
44  QString info = QLatin1String("### Person: ###################\n");
45  info += QLatin1String("name: #") + name() + QLatin1String("#\n");
46  info += QLatin1String("email: #") + email() + QLatin1String("#\n");
47  info += QLatin1String("uri: #") + uri() + QLatin1String("#\n");
48  info += QLatin1String("### Person end ################\n");
49 
50  return info;
51 }
52 
53 } // namespace Atom
54 } // namespace Syndication
Person()
creates a null person object
Definition: atom/person.cpp:17
QString email() const
returns an e-mail address associated with the person.
Definition: atom/person.cpp:37
QString name() const
a human-readable name for the person.
Definition: atom/person.cpp:27
QString uri() const
A URI associated with the person (optional).
Definition: atom/person.cpp:32
QString atom1Namespace()
namespace used by Atom 1.0 elements
QString debugInfo() const
description for debugging purposes
Definition: atom/person.cpp:42
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Nov 30 2023 03:51:26 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.