File indexing completed on 2024-10-06 09:45:06
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_ATOM_PERSON_H 0009 #define SYNDICATION_ATOM_PERSON_H 0010 0011 #include <syndication/elementwrapper.h> 0012 0013 class QDomElement; 0014 class QString; 0015 0016 namespace Syndication 0017 { 0018 namespace Atom 0019 { 0020 /** 0021 * describes a person, with name and optional URI and e-mail address. 0022 * Used to describe authors and contributors of feeds/entries 0023 * 0024 * @author Frank Osterfeld 0025 */ 0026 class SYNDICATION_EXPORT Person : public ElementWrapper 0027 { 0028 public: 0029 /** 0030 * creates a null person object 0031 */ 0032 Person(); 0033 0034 /** 0035 * creates a Person object wrapping an Atom Person Construct (atom:author, 0036 * atom:contributor tags) 0037 * @param element a DOM element, should be a Atom Person Construct 0038 * (although not enforced), otherwise this object will not parse 0039 * anything useful 0040 */ 0041 explicit Person(const QDomElement &element); 0042 0043 /** 0044 * a human-readable name for the person. (required) 0045 * The name is a required attribute of person constructs. 0046 * 0047 * @return a human-readable name of the person 0048 */ 0049 Q_REQUIRED_RESULT QString name() const; 0050 0051 /** 0052 * A URI associated with the person (optional). Usually the homepage. 0053 * 0054 * @return the URI of the person, or a null string if not specified 0055 */ 0056 Q_REQUIRED_RESULT QString uri() const; 0057 0058 /** 0059 * returns an e-mail address associated with the person. (optional) 0060 * 0061 * @return an e-mail address, or a null string if not specified 0062 */ 0063 Q_REQUIRED_RESULT QString email() const; 0064 0065 /** 0066 * description for debugging purposes 0067 * 0068 * @return debug string 0069 */ 0070 Q_REQUIRED_RESULT QString debugInfo() const; 0071 }; 0072 0073 } // namespace Atom 0074 } // namespace Syndication 0075 0076 #endif // SYNDICATION_ATOM_PERSON_H